0

I cant install any packages through pip it shows me error:-

PS

C:\WINDOWS\system32> pip install virtualenv
Collecting virtualenv
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0423C5D0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0423C3B0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0423C290>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0423C090>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x0423C7F0>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))': /simple/virtualenv/
  Could not find a version that satisfies the requirement virtualenv (from versions: )
No matching distribution found for virtualenv
Michael Butscher
  • 10,028
  • 4
  • 24
  • 25
ABHAY KOTAL
  • 153
  • 3
  • 13
  • 1
    At first: it's kind of brave to use that folder as your working directory. Despite of that you should check if your proxy is properly configured and working. You should also try without any proxy settings. – Klaus D. Dec 16 '18 at 07:37
  • Possible duplicate of [pip install failing with 407 Proxy Authentication Required](https://stackoverflow.com/questions/46466241/pip-install-failing-with-407-proxy-authentication-required) – phd Dec 16 '18 at 12:54
  • https://stackoverflow.com/search?q=%5Bpip%5D+ProxyError+Cannot+connect+to+proxy – phd Dec 16 '18 at 12:54

2 Answers2

0

This type of Error occurs while updating the pip. But can be resolved by using following commands.

  • step 1:

    curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py

  • step 2:

    python3 get-pip.p --force-reinstall

  • step 3:

Now check the pip version:

pip3 --version
Adam
  • 2,726
  • 1
  • 9
  • 22
N.Neupane
  • 281
  • 1
  • 4
  • 17
-1

This can happen with older versions of pip. Try to upgrade it with pip install --upgrade pip

Andrii Zarubin
  • 2,165
  • 1
  • 18
  • 31