I have tried to set up a python development environment at my work place to create some basic applications. I can’t seem to get pip to work, for example I type in pip install numpy and get the following error message:
Retrying (Retry(total=3, connect=None, read=None, redirect=None)) after connection broken by 'ConnectTimeoutError(<pip ._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection object at 0x035884B0>, 'Connection to pypi.python. org timed out. (connect timeout=15)')': /simple/numpy/
The research I have done seems to indicate that proxy awareness is my issue, is this correct, if so I am not really sure on what this means exactly or how to resolve it.
Answers:
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
Method 1
If you know your proxy information, you can pass that to your command line:
pip install --proxy=user:<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="136372606053607661657661">[email protected]</a>:port numpy
A full string could be something as simple as:
pip install --proxy=http://proxy.example.com numpy
Where proxy.example.com is your (corporate) proxy server. You only need to pass user:pass and port if the proxy also requires that information.
Method 2
pip doesn’t work if you are using a proxy server for installing packages.
To fix it: Go to control panel -> Internet options -> Connections ->LAN Settings ->Unmark ‘use proxy server’ options.
Try using pip after this, it should work.
You can start using proxy server after installing the package.
Method 3
This too works
pip --proxy http://user:<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="1969786a6a596a7c6b6f7c6b">[email protected]</a>:port install libraryName
Method 4
In order to fix it temporarily, I disconnected from my Secure VPN and then I was able to proceed with download. So, yes, its definitely an issue with proxy.
Method 5
Just try the below
pip install --proxy=user:<a href="https://getridbug.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="e999889a9aa99a8c9b9f8c9b">[email protected]</a>:port <package Name>
for example
pip install --proxy=http://10.10.10.150/accelerated_pac_base.pac quandl
Method 6
Go to environment variables, and add 2 new variables:
http_proxy and https_proxy to your proxy address. It’s worked for me.
Method 7
I was getting this error message in a virtualbox, and tried every variation of the suggestions here to fix what appeared to be a proxy error. In the end it turned out that the time was set wrong within the virtual machine.
Method 8
I wanted to install pygame. I use my personal internet connection. But I received an error.
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ConnectTimeoutError(<pip._vendor.urllib3.connection.HTTPSConnection object at 0x0000023C1F52C400>, 'Connection to 10.50.225.222 timed out. (connect timeout=15)')': /simple/pygame/
In order to avoid this, go to environment variables. Delete http_proxy and https_proxy from user variables located in environment variables.
Then I could download the pip whatever thing(It means pygame).
Method 9
-
Press Win+R open Run, type in
regeditand click OK. -
Move to
HKEY_CURRENT_USER/Software/Microsoft/Windows/Current Version/Internet Settings. -
Find a file name
ProxyServerand delete it. - Open PowerShell
-
Fire a command
pip install flask
Method 10
I encountered the same issue. It turns out that the system time was wrong. Once I corrected the time, pip installed the module without a hitch.
So, check to make sure that your system time is set correctly. It appears that pip does not work correctly when the clock is off.
Method 11
Set proxy setting in Internet Explorer.
Settings>Internet options>Connections>LAN Settings>Proxy Server
->Check the checkBox and fill in your (system/organization) proxy settings
No try your commands. It should work.
All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0