Having http_proxy='' in env causes "Cannot fetch index base URL"
See original GitHub issuepip install --use-mirrors virtualenv
Downloading/unpacking virtualenv
Cannot fetch index base URL http://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement virtualenv
No distributions at all found for virtualenv
Storing complete log in /Users/reyzlin/.pip/pip.log
Here’s the log /Users/reyzlin/.pip/pip.log:
cat /Users/reyzlin/.pip/pip.log
------------------------------------------------------------
/usr/local/bin/pip run on Mon Mar 12 10:51:54 2012
Downloading/unpacking yolk
Getting page http://pypi.python.org/simple/yolk
Could not fetch URL http://pypi.python.org/simple/yolk: timed out
Will skip URL http://pypi.python.org/simple/yolk when looking for download links for yolk
Getting page http://pypi.python.org/simple/
Could not fetch URL http://pypi.python.org/simple/: timed out
Will skip URL http://pypi.python.org/simple/ when looking for download links for yolk
Cannot fetch index base URL http://pypi.python.org/simple/
URLs to search for versions for yolk:
* http://pypi.python.org/simple/yolk/
Getting page http://pypi.python.org/simple/yolk/
Could not fetch URL http://pypi.python.org/simple/yolk/: timed out
Will skip URL http://pypi.python.org/simple/yolk/ when looking for download links for yolk
Operation cancelled by user
Exception information:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip-1.0.2-py2.7.egg/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/Library/Python/2.7/site-packages/pip-1.0.2-py2.7.egg/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/Library/Python/2.7/site-packages/pip-1.0.2-py2.7.egg/pip/req.py", line 954, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/Library/Python/2.7/site-packages/pip-1.0.2-py2.7.egg/pip/index.py", line 137, in find_requirement
for page in self._get_pages(locations, req):
File "/Library/Python/2.7/site-packages/pip-1.0.2-py2.7.egg/pip/index.py", line 225, in _get_pages
t.join()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 642, in join
self.__block.wait()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 238, in wait
waiter.acquire()
KeyboardInterrupt
I then check for http env variables:
env | grep -i http
http_proxy=
So I have an empty http_proxy
variable. Should it fail with that?
After doing
unset http_proxy
And running
pip install --use-mirrors virtualenv
I can install it no problem.
Should it behave this way?
Thanks!
Issue Analytics
- State:
- Created 12 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
6 Answers - 6 - Stack Overflow
I'm trying to install several packages using pip. When I do this using sudo, this error occurs: "Cannot fetch index base URL https://pypi.python ......
Read more >Error while installing with Python "pip": Cannot fetch index ...
That's very odd, the URL works fine on another computer, and wgetting the main page works fine. EDIT: In my case, I had...
Read more >python - iTecNote
pipproxypython. I'm trying to install several packages using pip. When I do this using sudo, this error occurs: "Cannot fetch index base URL...
Read more >Posted on - Brad's Place – Blog
pip – Cannot fetch index base URL http://pypi.python.org/simple/ · Start by initialising virtualenv and activating it · Update pip and override ...
Read more >cannot fetch index base url : Forums - pip install
Our proxy was taken down by an internal DDOS overnight. As a free user you can only connect to the internet via the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
i was having the same problem while trying to install virtualenv. i do have a proxy server and other things like
curl
,port
, etc. are able to use my environment variables. butpip
doesn’t seem to recognize them so i have to provide my proxy to it each time i use it.things worked out for me when i used my proxy settings with the command
give it a try if you are actually behind a proxy server. if you are not, then i’m afraid i can’t diagnose your problem. though i’d guess that you have some kind of network connectivity issue.
I setup the HTTPS but with the samve error.