Issue
I'm hoping SO will be able to help with this problem.
I am unable to pip install any packages when I am in a virtualenv. I'm on Windows 7, and python 2.7.12.
For example, when I use git bash like this:
(venv2)
[email protected] ~/git/myrepo (master)
$ pip install requests
I get the following error:
Collecting requests
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A438F0>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43790>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/
Retrying (Retry(total=2, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43B50>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/
Retrying (Retry(total=1, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43DD0>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/
Retrying (Retry(total=0, connect=None, read=None, redirect=None)) after connection broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x02A43E50>: Failed to establish a new connection: [Errno 11003] getaddrinfo failed',)': /simple/requests/
Could not find a version that satisfies the requirement requests (from versions: )
No matching distribution found for requests
However, when I am not in a virtualenv, I can pip install packages just fine. I've read quite a lot of SO questions about similar errors, but none match my case very well.
Some things I tried: uninstalling and reinstalling python; upgrading pip; switching python versions.
If you can point me in the right direction, I'd greatly appreciate it
Solution
Old question, but I just had a very similar problem and there was no answer posted.
When my repo was on my G: drive, and python install was on C:. Moving the repo to the C: drive solved my issue and I was able to use pip to install my venv requirements.txt.
on G:\
(env) G:\repo\>pip install -r requirements.txt
Collecting flask>=0.11 (from -r requirements.txt (line 1))
Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connec
tion broken by 'NewConnectionError('<pip._vendor.requests.packages.urllib3.conne
ction.VerifiedHTTPSConnection object at 0x0000000004393E10>: Failed to establish
a new connection: [Errno 11003] getaddrinfo failed',)': /simple/flask/
Retrying (Retry(total=3, ...
Could not find a version that satisfies the requirement flask>=0.11 (from -r r
equirements.txt (line 1)) (from versions: )
No matching distribution found for flask>=0.11 (from -r requirements.txt (line 1
))
on C:\
(env) C:\repo\>pip install -r requirements.txt
Collecting flask>=0.11 (from -r requirements.txt (line 1))
Using cached Flask-0.12-py2.py3-none-any.whl
...
Answered By - John Robinson Answer Checked By - Mary Flores (WPSolving Volunteer)