0

I try this:

pip install numpy

I get this:

The directory '/home/teoman/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
The directory '/home/teoman/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting numpy
  Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/numpy/
  Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/numpy/
  Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/numpy/
  Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/numpy/
  Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)': /simple/numpy/
  Could not fetch URL https://pypi.python.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.python.org', port=443): Max retries exceeded with url: /simple/numpy/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.",)) - skipping
  Could not find a version that satisfies the requirement numpy (from versions: )
No matching distribution found for numpy

I've almost tried everything from this question even though the problem is actaully different (I noticed it now) What is wrong?

teoman
  • 959
  • 2
  • 10
  • 21
  • The easiest way is to download the .whl files manually from Pypi and install them directly. You don't need SSL for that – c2huc2hu Jun 13 '18 at 13:12
  • That's may be right but I do not want to install packages via wheels forever, I need to solve this. – teoman Jun 14 '18 at 05:45
  • As a guess, try installing the ssl package manually. Then try `pip install numpy` – c2huc2hu Jun 14 '18 at 13:11

1 Answers1

1

You can use a mirror:

pip install --index https://pypi.mirrors.ustc.edu.cn/simple numpy

The --index argument enables specifying the python lib mirror.


For China region user, here are some mirrors: 找到了一些国内镜像如下:

Kins
  • 547
  • 1
  • 5
  • 22
neurobot
  • 328
  • 2
  • 9