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
748 stars 312 forks source link

pip install broken in latest version #247

Closed nbttmbrg closed 3 years ago

nbttmbrg commented 3 years ago

Environment

Steps or code snippet to reproduce

Prepare a virtualenv on a clean container/machine (here on CentOS):

$ yum install -y python-setuptools epel-release openssl openssl-devel gcc python-devel python-virtualenv python36 python36-devel
$ virtualenv -p python3.6 /opt/custom-venvs/fooenv
$ source /opt/custom-venvs/fooenv/bin/activate
(fooenv) $ /opt/custom-venvs/fooenv/bin/pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org --trusted-host pypi.python.org --trusted-host github.com -U git+https://github.com/vmware/vsphere-automation-sdk-python.git --use-feature=2020-resolver

## Actual behavior
Collecting git+https://github.com/vmware/vsphere-automation-sdk-python.git
  Cloning https://github.com/vmware/vsphere-automation-sdk-python.git to /tmp/pip-req-build-p2_isynp
Ignoring suds: markers 'python_version < "3"' don't match your environment
Collecting lxml>=4.3.0
  Downloading lxml-4.6.1-cp36-cp36m-manylinux1_x86_64.whl (5.5 MB)
     |################################| 5.5 MB 372 kB/s
Collecting suds-jurko
  Downloading suds-jurko-0.6.zip (255 kB)
     |################################| 255 kB 4.7 MB/s
Collecting pyVmomi>=6.7
  Downloading pyvmomi-7.0.1.tar.gz (584 kB)
     |################################| 584 kB 3.9 MB/s
Processing ./tmp/pip-req-build-p2_isynp/lib/vapi-runtime/vapi_runtime-2.19.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /opt/custom-venvs/fooenv/lib/python3.6/site-packages (from vapi-runtime@ file://localhost//tmp/pip-req-build-p2_isynp/lib/vapi-runtime/vapi_runtime-2.19.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.41.0) (28.8.0)
Processing ./tmp/pip-req-build-p2_isynp/lib/vapi-client-bindings/vapi_client_bindings-3.5.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /opt/custom-venvs/fooenv/lib/python3.6/site-packages (from vapi-runtime@ file://localhost//tmp/pip-req-build-p2_isynp/lib/vapi-runtime/vapi_runtime-2.19.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.41.0) (28.8.0)
Processing ./tmp/pip-req-build-p2_isynp/lib/vapi-common-client/vapi_common_client-2.19.0-py2.py3-none-any.whl
Processing ./tmp/pip-req-build-p2_isynp/lib/vmc-client-bindings/vmc_client_bindings-1.30.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /opt/custom-venvs/fooenv/lib/python3.6/site-packages (from vapi-runtime@ file://localhost//tmp/pip-req-build-p2_isynp/lib/vapi-runtime/vapi_runtime-2.19.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.41.0) (28.8.0)
Processing ./tmp/pip-req-build-p2_isynp/lib/nsx-python-sdk/nsx_python_sdk-3.0.2.0.0.16837625-py2.py3-none-any.whl
Processing ./tmp/pip-req-build-p2_isynp/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-3.0.2.0.0.16837625-py2.py3-none-any.whl
Processing ./tmp/pip-req-build-p2_isynp/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-3.0.2.0.0.16837625-py2.py3-none-any.whl
Processing ./tmp/pip-req-build-p2_isynp/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-3.0.2.0.0.16837625-py2.py3-none-any.whl
Processing ./tmp/pip-req-build-p2_isynp/lib/vmc-draas-client-bindings/vmc_draas_client_bindings-1.14.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /opt/custom-venvs/fooenv/lib/python3.6/site-packages (from vapi-runtime@ file://localhost//tmp/pip-req-build-p2_isynp/lib/vapi-runtime/vapi_runtime-2.19.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.41.0) (28.8.0)
Collecting requests>=2.3.0
  Downloading requests-2.24.0-py2.py3-none-any.whl (61 kB)
     |################################| 61 kB 324 kB/s
Collecting six>=1.7.3
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pyOpenSSL>=18.0.0
  Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB)
     |################################| 53 kB 1.3 MB/s
Collecting idna<3,>=2.5
  Downloading idna-2.10-py2.py3-none-any.whl (58 kB)
     |################################| 58 kB 2.2 MB/s
Collecting certifi>=2017.4.17
  Downloading certifi-2020.11.8-py2.py3-none-any.whl (155 kB)
     |################################| 155 kB 5.7 MB/s
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
     |################################| 133 kB 4.9 MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Downloading urllib3-1.25.11-py2.py3-none-any.whl (127 kB)
     |################################| 127 kB 4.4 MB/s
Collecting cryptography>=2.8
  Downloading cryptography-3.2.1-cp35-abi3-manylinux2010_x86_64.whl (2.6 MB)
     |################################| 2.6 MB 3.4 MB/s
Collecting cffi!=1.11.3,>=1.8
  Downloading cffi-1.14.3-cp36-cp36m-manylinux1_x86_64.whl (400 kB)
     |################################| 400 kB 4.2 MB/s
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |################################| 112 kB 3.4 MB/s
Building wheels for collected packages: vSphere-Automation-SDK, suds-jurko, pyVmomi
  Building wheel for vSphere-Automation-SDK (setup.py) ... done
  Created wheel for vSphere-Automation-SDK: filename=vSphere_Automation_SDK-1.41.0-py3-none-any.whl size=2228 sha256=6d064fe3f7c417fb2243ba711a7c2887ac963a4db73f4447a28875443b8b732f
  Stored in directory: /tmp/pip-ephem-wheel-cache-0mt6b76l/wheels/8e/ff/54/645ff58ea9a0015f537c215d38ba69087bf8da12df04cf0c01
  Building wheel for suds-jurko (setup.py) ... done
  Created wheel for suds-jurko: filename=suds_jurko-0.6-py3-none-any.whl size=453007 sha256=837b435a768abf9fe07df5bc3c177d9f3c50fdda588f2be31b20e870ef4522ae
  Stored in directory: /root/.cache/pip/wheels/03/9f/e2/722c1275720fde3df9c7a87442f13c29067e488123b9887ed9
  Building wheel for pyVmomi (setup.py) ... done
  Created wheel for pyVmomi: filename=pyvmomi-7.0.1-py2.py3-none-any.whl size=250583 sha256=44b71ffc71b291d2e53aa29c1ec986386f75a8f6d6e8ad34a56e36992e1a7824
  Stored in directory: /root/.cache/pip/wheels/bc/33/4b/a1f4dce3e98656460f03aaa0865c7e34f8a8e87efa9105b892
Successfully built vSphere-Automation-SDK suds-jurko pyVmomi
Installing collected packages: pycparser, six, cffi, urllib3, idna, cryptography, chardet, certifi, requests, pyOpenSSL, vapi-runtime, vapi-common-client, vmc-draas-client-bindings, vmc-client-bindings, vapi-client-bindings, suds-jurko, pyVmomi, nsx-vmc-policy-python-sdk, nsx-vmc-aws-integration-python-sdk, nsx-python-sdk, nsx-policy-python-sdk, lxml, vSphere-Automation-SDK
**ERROR: vsphere-automation-sdk 1.41.0 requires suds, which is not installed.
Successfully installed certifi-2020.11.8 cffi-1.14.3 chardet-3.0.4 cryptography-3.2.1 idna-2.10 lxml-4.6.1 nsx-policy-python-sdk-3.0.2.0.0.16837625 nsx-python-sdk-3.0.2.0.0.16837625 nsx-vmc-aws-integration-python-sdk-3.0.2.0.0.16837625 nsx-vmc-policy-python-sdk-3.0.2.0.0.16837625 pyOpenSSL-19.1.0 pyVmomi-7.0.1 pycparser-2.20 requests-2.24.0 six-1.15.0 suds-jurko-0.6 urllib3-1.25.11 vSphere-Automation-SDK-1.41.0 vapi-client-bindings-3.5.0 vapi-common-client-2.19.0 vapi-runtime-2.19.0 vmc-client-bindings-1.30.0 vmc-draas-client-bindings-1.14.0**

Expected behavior

pip shouldn't even try to install "suds" because my Python version is > to 3.0 Despite the ERROR vSphere-Automation-SDK is installed, but this ERROR is failing one of our CI process.

Thank you

nbttmbrg commented 3 years ago

If I run it twice, the second run is without error.

anusha94 commented 3 years ago

@nbttmbrg

Can you try the installation again in a clean virtual environment? Also, if the issue persists, can you show the output of pip list after the first run?

nbttmbrg commented 3 years ago

Hello,

Same symptom, as expected pip list shows the SDK as installed, but this ERROR is still crashing my CI process :

Package                            Version
---------------------------------- ------------------
certifi                            2020.11.8
cffi                               1.14.3
chardet                            3.0.4
cryptography                       3.2.1
idna                               2.10
lxml                               4.6.1
nsx-policy-python-sdk              3.0.2.0.0.16837625
nsx-python-sdk                     3.0.2.0.0.16837625
nsx-vmc-aws-integration-python-sdk 3.0.2.0.0.16837625
nsx-vmc-policy-python-sdk          3.0.2.0.0.16837625
pip                                20.2.4
pycparser                          2.20
pyOpenSSL                          19.1.0
pyvmomi                            7.0.1
requests                           2.24.0
setuptools                         28.8.0
six                                1.15.0
suds-jurko                         0.6
urllib3                            1.25.11
vapi-client-bindings               3.5.0
vapi-common-client                 2.19.0
vapi-runtime                       2.19.0
vmc-client-bindings                1.30.0
vmc-draas-client-bindings          1.14.0
vSphere-Automation-SDK             1.41.0
wheel                              0.29.0
anusha94 commented 3 years ago

@nbttmbrg

Were you able to resolve this?

nbttmbrg commented 3 years ago

No, we're doing things differently now. Thanks