gpt4 book ai didi

python - 在尝试安装 numpy 时出错 - python 3

转载 作者:可可西里 更新时间:2023-11-01 10:41:21 29 4
gpt4 key购买 nike

我刚在电脑上安装了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

我读到我需要在脚本中找到 python.exe,所以我找到了它并将这一行输入到终端,但我得到了这个:

enter image description here

我该怎么办?

最佳答案

此错误可能是因为缺少 openssl。只需重新安装 openssl(或首次安装)即可解决问题。以下用户似乎在 Windows 中修复了类似的问题。 https://stackoverflow.com/a/54932141/8292612

关于python - 在尝试安装 numpy 时出错 - python 3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54922987/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com