I am trying to install pygame with pip install . but every time i tried i faced to this error.
Retrying (Retry(total=4, connect=None, read=None, redirect=None))
after connection broken by 'ProxyError('Cannot connect to proxy.',
NewConnectionError(': Failed to establish a new connection: [WinError
10061] No connection could be made because the target machine actively
refused it',))': /simple/pygame-1-9-3-cp36-cp36m-win-amd64/ Retrying
(Retry(total=3, connect=None, read=None, redirect=None)) after
connection broken by 'ProxyError('Cannot connect to proxy.',
NewConnectionError(': Failed to establish a new connection: [WinError
10061] No connection could be made because the target machine actively
refused it',))': /simple/pygame-1-9-3-cp36-cp36m-win-amd64/ Retrying
(Retry(total=2, connect=None, read=None, redirect=None)) after
connection broken by 'ProxyError('Cannot connect to proxy.',
NewConnectionError(': Failed to establish a new connection: [WinError
10061] No connection could be made because the target machine actively
refused it',))': /simple/pygame-1-9-3-cp36-cp36m-win-amd64/ Operation
cancelled by user*
I have done it with other libraries but I faced the same problem
Go to this Website, download the pygame‑1.9.3‑cp36‑cp36m‑win_amd64.whl file, open cmd, change directory to the folder you have the .whl file end type:
pip install pygame‑1.9.3‑cp36‑cp36m‑win_amd64.whl
.
This works when you are trying to install packages and firewalls are blocking the connection.
I had the same issue in windows. My antivirus was blocking PIP requests. Try disabling your antivirus(in my case manually killed it from task manager).
It looks like pip
is not connecting to the internet. I have a few options --
I don't know if they will work, but you can try them.
- Try to reinstall
pip
(pip3
if using python3) I had to do this on my
systeme, as pip3
didn't work initally either.
- Check and see if you can ping a website from your terminal to check connectivity. You could have an error with your terminal (if using linux) and not with python itself.
Good luck, and hope this helps!
I had same error message when I tried to install Python packages on my laptop with Windows 10 OS.
I tried all methods recommended online and it still didn't work. I have been noticing for a while that Windows 10 automatically set proxy off causing Internet access problem sometime.
Then I googled with keywords: 'windows 10 automatic proxy setting off'. Someone mentioned to modify regedit key value of [ProxyEnabled=1] under Computer\HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
I opened the regedit and found it's [ProxyEnabled=1]. I compared HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings
with another workstation with relatively clean image. It's [ProxyEnabled=0] and no other extra entry for Proxy.
Solution: set ProxyEnabled=0 and delete any other Proxy entries.
It worked successfully! pip install package_name