Closed sosher closed 4 years ago
Same here.
same here.
Does anyone know a solution?
Looks like the pip3 is looking https://pypi.org/simple for installing package "nsx_policy_python_sdk", instead of local repo /lib directory
pip is doing so also:
pip 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-zdCZH8-build Collecting lxml>=4.3.0 (from vSphere-Automation-SDK==1.15.0) Using cached https://files.pythonhosted.org/packages/25/73/730ad7249847f741c7e622f52b971daa5540f6fb87589bc92c717f5aafba/lxml-4.4.2-cp27-cp27mu-manylinux1_x86_64.whl Collecting nsx-policy-python-sdk@ file://localhost//tmp/pip-zdCZH8-build/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-2.3.0.0.3.13851140-py2.py3-none-any.whl (from vSphere-Automation-SDK==1.15.0) Exception: Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main status = self.run(options, args) File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 353, in run wb.build(autobuilding=True) File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 749, in build self.requirement_set.prepare_files(self.finder) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 380, in prepare_files ignore_dependencies=self.ignore_dependencies)) File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 554, in _prepare_file require_hashes File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 278, in populate_link self.link = finder.find_requirement(self, upgrade) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 465, in find_requirement all_candidates = self.find_all_candidates(req.name) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 423, in find_all_candidates for page in self._get_pages(url_locations, project_name): File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _get_pages page = self._get_page(location) File "/usr/lib/python2.7/dist-packages/pip/index.py", line 683, in _get_page return HTMLPage.get_page(link, session=self.session) File "/usr/lib/python2.7/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) HTTPError: 404 Client Error: Not Found for url: https://pypi.org/simple/nsx-policy-python-sdk/
I'm able to reproduce that with python3 too:
$ pip3 install --upgrade git+https://github.com/vmware/vsphere-automati
on-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-_39v8ngz-build
Collecting lxml>=4.3.0 (from vSphere-Automation-SDK==1.15.0)
Downloading https://files.pythonhosted.org/packages/68/30/affd16b77edf9537f5be051905f33527021e20d563d013e8c42c7fd01949/lxml-4.4.2-cp36-cp36m-manylinux1_x86_64.whl (5.8MB)
100% |████████████████████████████████| 5.8MB 305kB/s
Collecting nsx-policy-python-sdk@ file://localhost//tmp/pip-_39v8ngz-build/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-2.3.0.0.3.13851140-py2.py3-none-any.whl (from vSphere-Automation-SDK==1.15.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/
Version:
$ python3 -V
Python 3.6.7
$ pip3 -V
pip 9.0.1 from /usr/lib/python3/dist-packages (python 3.6)
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
Can you upgrade your pip3 to the latest and try? This is working in my MAC OS and Ubuntu 16.0.4 setup, where pip version is 19.3.1
I suspect this could be because of https://github.com/pypa/pip/pull/6367 , related to https://github.com/pypa/pip/issues/6428 . These are fixed in pip 19.1+.
I reproduced this issue in Ubuntu 18.04 LTS, with default pip version of 9.0.1.
Upgraded pip to the latest, pip3 install --upgrade pip
And new pip version is 19.3.1.
pip install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
is working as expected
Make sure, the packages requests>=2.21.0, six>=1.12
for the successful installation of vapi-runtime 2.12.0
I can confirm that upgrading pip solves the problem. I am not sure how helpful this will be for other people as a solution.. BTW it is not restricted to Ubuntu.. the same issue surfaced on arch linux and Windows as well.
Thanks for confirming. Closing the issue
Hi Team, Getting a url error when trying to install the sdk , Thank you very much
Environment
sdk package version: trying to install per instructions,
pyvmomi (6.7.3) service-identity (16.0.0)
python version: python 3.6.8
vSphere version: 6.7 u3
Operating System/Shell (used to run SDK-based apps): ubuntu 18.04
Steps or code snippet to reproduce
pip3 install --upgrade git+https://github.com/vmware/vsphere-automation-sdk-python.git
result
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-170hb_a5-build Collecting lxml>=4.3.0 (from vSphere-Automation-SDK==1.10.0) Using cached https://files.pythonhosted.org/packages/ec/be/5ab8abdd8663c0386ec2dd595a5bc0e23330a0549b8a91e32f38c20845b6/lxml-4.4.1-cp36-cp36m-manylinux1_x86_64.whl Collecting nsx-policy-python-sdk@ file://localhost//tmp/pip-170hb_a5-build/lib/nsx-policy-python-sdk/nsx_policy_python_sdk-2.3.0.0.3.13851140-py2.py3-none-any.whl (from vSphere-Automation-SDK==1.10.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/