我刚刚在计算机上安装了PyCharm,我想在WIN7上下载numpy
。
我将pip install numpy
放在了PaCharm的终端中,但是出现了这个错误:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
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 availabl
e.")': /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 availabl
e.")': /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 availabl
e.")': /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 availabl
e.")': /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 availabl
e.")': /simple/numpy/
Could not fetch URL https://pypi.org/simple/numpy/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.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
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /si
mple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
我找到了写建议:
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip setuptools
但是当我把它放进去时,我得到了:
pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip setuptools
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
ERROR: To modify pip, please run the following command:
C:\Users\Admin\PycharmProjects\lab05\venv\Scripts\python.exe -m pip install --trusted-host pypi.org --trusted-host files.pythonhosted.org pip setuptools
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /si
mple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
我已经读到我需要在Scripts中找到python.exe,所以我找到了它并在终端上输入了这行,但是我明白了:
我该怎么办?
答案 0 :(得分:0)
此错误可能是由于缺少openssl引起的。只需重新安装openssl(或第一次安装)就可以解决此问题。以下用户似乎已修复Windows中的类似问题。 https://stackoverflow.com/a/54932141/8292612