theZoo icon indicating copy to clipboard operation
theZoo copied to clipboard

HTTPError at pip install

Open XiQshoner opened this issue 4 years ago • 6 comments

Trying to enter the pip install commands and I am faced with an error see below:

someone@SOMETHING:~/theZoo$ pip install --user -r requirements.txt Collecting urllib2 (from -r requirements.txt (line 1)) 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/urllib2/

XiQshoner avatar Jul 22 '19 17:07 XiQshoner

I am getting the same error. 404 on pip install requirements. I also verified in a browser the page comes up with a 404.

crypiehef avatar Jul 22 '19 22:07 crypiehef

urllib2 is included in python 2.7. You shouldn't need to (and can't) install it if using python 2.7.

mlalibs avatar Aug 22 '19 21:08 mlalibs

urllib 2 is no longer up. I was able to substitute urllib3 and it ran fine

neubix avatar Sep 01 '19 06:09 neubix

https://pypi.org/project/urllib3/

neubix avatar Sep 01 '19 06:09 neubix

With Python 2.7, changing requirements.txt to have urllib3 instead of 2 works for me.

classaxe avatar May 14 '20 16:05 classaxe

Yep can confirm that changing requirement urllib2 to urllib3 fixes this problem

Morsmalleo avatar Nov 11 '21 05:11 Morsmalleo