0

until recently, I had no problems installing packages using

pip install package_name 

through command prompt. However, recently, I started receiving the following error message for 99% of packages I attempt to install (note: if the package is already installed, i do get "requirement already satisfied error").

          Retrying (Retry(total=0, connect=None, read=None, redirect=None)) 
    after connection broken by 'ProxyError('Cannot connect to proxy.', 
        NewConnectionError('<pip._vendor.requests.packages.urllib3.connection.VerifiedHTTPSConnection 
object at 0x00000000041D2A90>: Failed to establish a new connection:
 [Errno 10061]  No connection could be made because the target machine 
actively refused it',))': /simple/pattern/

Any idea on whats going on here, and how I can go about fixing it?

Thank you in advance!

FlyingZebra1
  • 1,285
  • 1
  • 18
  • 28
  • 1
    Try upgrading pip `pip install --upgrade pip` or on windows `python -m pip install --upgrade pip` or `easy_install pip` – Christian Jan 01 '18 at 08:37
  • ok, this actually gave me the same error as above, 4 times, then said the requirement already satisfied. Any idea on whats happening ? 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: [Errno 10061] No connection could be made because the target machine actively refused it',))': /simple/pip/ – FlyingZebra1 Jan 01 '18 at 08:55
  • 1
    Googling the error, it looks like a network issue on your side. I can run `pip install pattern` from here with no problem. Has your network changed? Are you behind a proxy or firewall? – Christian Jan 01 '18 at 08:56
  • 1
    If you have got a proxy: `sudo -H pip install pattern --proxy="my_proxy_name:port"` – Christian Jan 01 '18 at 08:59
  • yeah, no dice. same errors. One thing i should specify is that im using jupyter notebook. However, same error message. In the past few days i have been working with a script that switches out proxies every run (via requests library), so maybe that had something to do with this error – FlyingZebra1 Jan 01 '18 at 09:06
  • 1
    It sounds network related which is the issue you're having. Tricky to help you further but hopefully you can focus on the proxy issue. – Christian Jan 01 '18 at 09:07
  • yup. sounds like a network issue of some sort. Just tried pip uninstall pandas... and now can't install it :-/ oops. will try to diagnose and post on here once i figure it out. Thanks for the help! – FlyingZebra1 Jan 01 '18 at 09:10
  • 1
    mystery solved! Was a simple setting in windows that i had to change. Answer is as follows: 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. . Note - the original answer is here, by The_Vats https://stackoverflow.com/questions/30992717/proxy-awareness-with-pip – FlyingZebra1 Jan 01 '18 at 09:16

1 Answers1

3

Mystery Solved - this was a proxy setting within windows. Answer, provides by The_Vatts in this thread is as follows:

Go to control panel -> Internet options -> Connections ->LAN Settings ->Unmark 'use proxy server' options.

Judging by the other thread, this may not be exactly what some people are looking for, but this accomplished what i needed.

FlyingZebra1
  • 1,285
  • 1
  • 18
  • 28