vmware / vsphere-automation-sdk-python

Python samples, language bindings, and API reference documentation for vSphere, VMC, and NSX-T using the VMware REST API
MIT License
745 stars 313 forks source link

Air Gap Installation Issue #386

Closed dennym closed 1 year ago

dennym commented 1 year ago

Describe the bug

I followed the instructions for the air gap installation and prepared the zip file of the dependencies. Copied them into my "air gap" Dockerfile and when running pip install -U lib/*/*.whl it eventually fails on trying to connect to the outside world.

#12 2.204 Processing ./lib/vmc-draas-client-bindings/vmc_draas_client_bindings-1.21.0-py2.py3-none-any.whl
#12 7.265 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)'))': /simple/requests/
#12 12.80 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)'))': /simple/requests/
#12 18.84 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)'))': /simple/requests/
#12 25.88 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)'))': /simple/requests/
#12 34.92 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)'))': /simple/requests/
#12 39.96 Could not fetch URL https://pypi.org/simple/requests/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/requests/ (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1123)'))) - skipping
#12 39.96 INFO: pip is looking at multiple versions of vapi-common-client to determine which version is compatible with other requirements. This could take a while.
#12 39.96 INFO: pip is looking at multiple versions of nsx-vmc-policy-python-sdk to determine which version is compatible with other requirements. This could take a while.
#12 39.96 INFO: pip is looking at multiple versions of nsx-vmc-aws-integration-python-sdk to determine which version is compatible with other requirements. This could take a while.
#12 39.96 INFO: pip is looking at multiple versions of nsx-python-sdk to determine which version is compatible with other requirements. This could take a while.
#12 39.96 INFO: pip is looking at multiple versions of nsx-policy-python-sdk to determine which version is compatible with other requirements. This could take a while.
#12 39.96 ERROR: Could not find a version that satisfies the requirement requests<3.0.0,>=2.0.0 (from vapi-runtime)
#12 39.96 ERROR: No matching distribution found for requests<3.0.0,>=2.0.0

Bonusquestion regarding the instructions: According to the readme I am supposed to pip install -U lib/*/*.whl and then pip install -Upwd`. Wouldn't it the other way around make more sense since it supposed to first install the external requirements and then thelib/-libraries? Or am I supposed to unzip original zipfile of vsphere-automation-sdk-python first and then unzip the precompiled package into it to merge the lib folder? But even then the requirements wheels are inlib/.whl`... The instructions are a bit unclear for me.

Reproduction steps

  1. git clone [vsphere-automation-sdk-python](https://github.com/vmware/vsphere-automation-sdk-python)
  2. git checkout v8.0.1.0
  3. pip download -r requirements_pypi.txt -d lib
  4. zip -r lib.zip lib/ in Dockerfile
  5. COPY lib.zip /
  6. RUN unzip lib.zip
  7. RUN pip install -U lib/*/*.whl
  8. Error

Expected behavior

To run without errors.

aagrawal3 commented 1 year ago

Hi @dennym Please share your python version, pip version and Dockerfile.

aagrawal3 commented 1 year ago

Hi @dennym This seems to be a documentation issue. Please try RUN pip install -U lib/**/*.whl

aagrawal3 commented 1 year ago

We have updated the README in latest commit. Please reopen if issue persists.