1

I'm trying to get Python 3.6 with numpy and openCV setup on a windows 10 machine. I have python 3.6.8 installed with pip 18.1. When I try to install anything with pip, regardless of the package, I get the same result:

C:\WINDOWS\system32>pip install numpy
Collecting numpy
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3AE48>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3ABE0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3A8D0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3A7B8>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.VerifiedHTTPSConnection object at 0x000001D135A3A9B0>: Failed to establish a new connection: [Errno 11001] getaddrinfo failed',)': /simple/numpy/
  Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy

I've tried updating pip, and it tells me that it's already up-to-date. What's going on?

phd
  • 82,685
  • 13
  • 120
  • 165
tglenn28
  • 11
  • 1

3 Answers3

0

I figured it out. It was some proxy issue on my company's network. Using --proxy after pip install numpy worked.

tglenn28
  • 11
  • 1
-1

Please try this code

python3 -m pip install <pkg>
Devarshi Mandal
  • 703
  • 8
  • 16
  • This is what I get: C:\Users\tglenn17>python3 -m pip install numpy 'python3' is not recognized as an internal or external command, operable program or batch file. I've tried "python -m pip install numpy" and it does the same as when I just do "pip install numpy" – tglenn28 Jul 01 '19 at 17:33
  • In the command prompt you will have to first get into the 'Scripts' folder. something like cd C:.....\Programs\Python\Python37-32\Scripts. You will have to find the path of your Scripts folder. If you search in the folder, you will get. After that try the pip install command – Devarshi Mandal Jul 01 '19 at 17:50
-1

Try this code. This sets pypi.org and files.pythonhosted.org as trusted hosts to ignore SSL errors. pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org

Answer from this question: pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)"

tr2002a
  • 116
  • 9