Public bug reported: The ancient pip3 9.0.1-2 version in 18.04 has a bug that installing vmware sdk results in the error in the title. Upstream report https://github.com/vmware/vsphere-automation-sdk-python/issues/195
So either `pip3` needs to be upgraded, or the bugfix needs to be backported to 18.04. # Steps tor reproduce (in terms of terminal commands) $ pip3 install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git Collecting git+https://github.com/vmware/vsphere-automation-sdk-python.git Cloning https://github.com/vmware/vsphere-automation-sdk-python.git to /tmp/pip-l6ega5an-build Collecting lxml>=4.3.0 (from vSphere-Automation-SDK==1.32.0) Downloading https://files.pythonhosted.org/packages/79/37/d420b7fdc9a550bd29b8cfeacff3b38502d9600b09d7dfae9a69e623b891/lxml-4.5.2-cp36-cp36m-manylinux1_x86_64.whl (5.5MB) 100% |████████████████████████████████| 5.5MB 50kB/s Collecting nsx-policy-python-sdk@ file://localhost//tmp/pip-l6ega5an-build/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-2.5.1.0.5.16221899-py2.py3-none-any.whl (from vSphere-Automation-SDK==1.32.0) Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/usr/lib/python3/dist-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python3/dist-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/usr/lib/python3/dist-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/usr/lib/python3/dist-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/usr/lib/python3/dist-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/usr/lib/python3/dist-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/usr/lib/python3/dist-packages/pip/index.py", line 795, in get_page resp.raise_for_status() File "/usr/share/python-wheels/requests-2.18.4-py2.py3-none-any.whl/requests/models.py", line 935, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/nsx-policy-python-sdk/ ## Expected The SDK was installed ## Actual It fails with execption about a URL not being found. # Known workarounds Ubuntu 20.04 has more or less modern pip that does not have this bug. So: $ sed -i 's/bionic/focal/g' /etc/apt/sources.list $ apt update […] $ apt install python3-pip Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: kpartx liburcu6 sg3-utils-udev Use 'apt autoremove' to remove them. The following additional packages will be installed: python-pip-whl The following packages will be upgraded: python-pip-whl python3-pip 2 upgraded, 0 newly installed, 0 to remove and 635 not upgraded. Need to get 2,029 kB of archives. After this operation, 894 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://ru.archive.ubuntu.com/ubuntu focal/universe amd64 python3-pip all 20.0.2-5ubuntu1 [230 kB] Get:2 http://ru.archive.ubuntu.com/ubuntu focal/universe amd64 python-pip-whl all 20.0.2-5ubuntu1 [1,799 kB] Fetched 2,029 kB in 1s (1,974 kB/s) (Reading database ... 74821 files and directories currently installed.) Preparing to unpack .../python3-pip_20.0.2-5ubuntu1_all.deb ... Unpacking python3-pip (20.0.2-5ubuntu1) over (9.0.1-2.3~ubuntu1.18.04.1) ... Preparing to unpack .../python-pip-whl_20.0.2-5ubuntu1_all.deb ... Unpacking python-pip-whl (20.0.2-5ubuntu1) over (9.0.1-2.3~ubuntu1.18.04.1) ... Setting up python-pip-whl (20.0.2-5ubuntu1) ... Setting up python3-pip (20.0.2-5ubuntu1) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... $ pip3 install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git 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-q4805xx_ Running command git clone -q https://github.com/vmware/vsphere-automation-sdk-python.git /tmp/pip-req-build-q4805xx_ Collecting lxml>=4.3.0 Using cached lxml-4.5.2-cp36-cp36m-manylinux1_x86_64.whl (5.5 MB) Processing //tmp/pip-req-build-q4805xx_/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-2.5.1.0.5.16221899-py2.py3-none-any.whl Processing //tmp/pip-req-build-q4805xx_/lib/nsx-python-sdk/nsx_python_sdk-2.5.1.0.5.16221899-py2.py3-none-any.whl Processing //tmp/pip-req-build-q4805xx_/lib/nsx-vmc-aws-integration-python-sdk/nsx_vmc_aws_integration_python_sdk-2.5.1.0.5.16221899-py2.py3-none-any.whl Processing //tmp/pip-req-build-q4805xx_/lib/nsx-vmc-policy-python-sdk/nsx_vmc_policy_python_sdk-2.5.1.0.5.16221899-py2.py3-none-any.whl Collecting pyVmomi>=6.7 Downloading pyvmomi-7.0.tar.gz (587 kB) |████████████████████████████████| 587 kB 417 kB/s Processing //tmp/pip-req-build-q4805xx_/lib/vapi-client-bindings/vapi_client_bindings-3.3.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-q4805xx_/lib/vapi-common-client/vapi_common_client-2.15.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-q4805xx_/lib/vapi-runtime/vapi_runtime-2.15.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-q4805xx_/lib/vmc-client-bindings/vmc_client_bindings-1.26.0-py2.py3-none-any.whl Processing //tmp/pip-req-build-q4805xx_/lib/vmc-draas-client-bindings/vmc_draas_client_bindings-1.10.0-py2.py3-none-any.whl Collecting suds-jurko Downloading suds-jurko-0.6.tar.bz2 (143 kB) |████████████████████████████████| 143 kB 24.5 MB/s Requirement already satisfied, skipping upgrade: requests>=2.3.0 in /usr/lib/python3/dist-packages (from pyVmomi>=6.7->vSphere-Automation-SDK==1.32.0) (2.18.4) Requirement already satisfied, skipping upgrade: six>=1.7.3 in /usr/lib/python3/dist-packages (from pyVmomi>=6.7->vSphere-Automation-SDK==1.32.0) (1.11.0) Requirement already satisfied, skipping upgrade: setuptools in /usr/lib/python3/dist-packages (from vapi-client-bindings@ file://localhost//tmp/pip-req-build-q4805xx_/lib/vapi-client-bindings/vapi_client_bindings-3.3.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.32.0) (39.0.1) Collecting pyOpenSSL>=18.0.0 Downloading pyOpenSSL-19.1.0-py2.py3-none-any.whl (53 kB) |████████████████████████████████| 53 kB 805 kB/s Collecting cryptography>=2.8 Downloading cryptography-3.0-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB) |████████████████████████████████| 2.7 MB 1.8 MB/s Requirement already satisfied, skipping upgrade: cffi!=1.11.3,>=1.8 in /usr/local/lib/python3.6/dist-packages (from cryptography>=2.8->pyOpenSSL>=18.0.0->vapi-runtime@ file://localhost//tmp/pip-req-build-q4805xx_/lib/vapi-runtime/vapi_runtime-2.15.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.32.0) (1.14.0) Requirement already satisfied, skipping upgrade: pycparser in /usr/local/lib/python3.6/dist-packages (from cffi!=1.11.3,>=1.8->cryptography>=2.8->pyOpenSSL>=18.0.0->vapi-runtime@ file://localhost//tmp/pip-req-build-q4805xx_/lib/vapi-runtime/vapi_runtime-2.15.0-py2.py3-none-any.whl->vSphere-Automation-SDK==1.32.0) (2.20) Building wheels for collected packages: vSphere-Automation-SDK, pyVmomi, suds-jurko Building wheel for vSphere-Automation-SDK (setup.py) ... done Created wheel for vSphere-Automation-SDK: filename=vSphere_Automation_SDK-1.32.0-py3-none-any.whl size=2281 sha256=bf3defb0f35f01971cf7a661baa92e4cfb91d120f2d6ae9e4c9a2dc857981897 Stored in directory: /tmp/pip-ephem-wheel-cache-65dwwk6w/wheels/8e/ff/54/645ff58ea9a0015f537c215d38ba69087bf8da12df04cf0c01 Building wheel for pyVmomi (setup.py) ... done Created wheel for pyVmomi: filename=pyvmomi-7.0-py2.py3-none-any.whl size=248849 sha256=ab6eac79b141fcdd7e26f6e973d6fa6a8ccb74f295acbe16eb7b522f2aa0f71a Stored in directory: /root/.cache/pip/wheels/3f/8f/9c/241d58c8db3b3a94e267bc08678dc26eda7f2659a504986db1 Building wheel for suds-jurko (setup.py) ... done Created wheel for suds-jurko: filename=suds_jurko-0.6-py3-none-any.whl size=453172 sha256=504615bb4fc6e26d5d9ad8fb7b60d16ace3a284d19f4987c542f96b1d08aa500 Stored in directory: /root/.cache/pip/wheels/49/b5/36/9edcbbddf0c2eac2449f4b642c6a1161cb37ff56a868679025 Successfully built vSphere-Automation-SDK pyVmomi suds-jurko ERROR: vapi-runtime 2.15.0 has requirement requests>=2.21.0, but you'll have requests 2.18.4 which is incompatible. ERROR: vapi-runtime 2.15.0 has requirement six>=1.12, but you'll have six 1.11.0 which is incompatible. Installing collected packages: lxml, cryptography, pyOpenSSL, vapi-runtime, vapi-common-client, nsx-policy-python-sdk, nsx-python-sdk, nsx-vmc-aws-integration-python-sdk, nsx-vmc-policy-python-sdk, pyVmomi, vapi-client-bindings, vmc-client-bindings, vmc-draas-client-bindings, suds-jurko, vSphere-Automation-SDK Attempting uninstall: cryptography Found existing installation: cryptography 2.1.4 Not uninstalling cryptography at /usr/lib/python3/dist-packages, outside environment /usr Can't uninstall 'cryptography'. No files were found to uninstall. Attempting uninstall: pyVmomi Found existing installation: pyvmomi 6.5.0.2017.5.post1 Not uninstalling pyvmomi at /usr/lib/python3/dist-packages, outside environment /usr Can't uninstall 'pyvmomi'. No files were found to uninstall. Successfully installed cryptography-3.0 lxml-4.5.2 nsx-policy-python-sdk-2.5.1.0.5.16221899 nsx-python-sdk-2.5.1.0.5.16221899 nsx-vmc-aws-integration-python-sdk-2.5.1.0.5.16221899 nsx-vmc-policy-python-sdk-2.5.1.0.5.16221899 pyOpenSSL-19.1.0 pyVmomi-7.0 suds-jurko-0.6 vSphere-Automation-SDK-1.32.0 vapi-client-bindings-3.3.0 vapi-common-client-2.15.0 vapi-runtime-2.15.0 vmc-client-bindings-1.26.0 vmc-draas-client-bindings-1.10.0 $ sed -i 's/focal/bionic/g' /etc/apt/sources.list $ apt update […] ** Affects: python-pip (Ubuntu) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1891897 Title: pip3 install → 404 Client Error: Not Found To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/python-pip/+bug/1891897/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs