无法安装任何python软件包pip SSLError

时间:2020-06-18 10:22:13

标签: python-3.x ssl pip certificate

我最近更改了安装vpckg的环境路径-失败了,因此我将路径更改回以前的路径,请参见附带系统路径的图片。我不知道这是否产生了我当前遇到的问题,但是我添加了系统路径以防万一。 Image1

但是,现在当我尝试运行任何命令时,它告诉我必须重新安装Numpy。当我尝试执行此操作时,出现以下错误:

WARNING: 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/pip/

WARNING: 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/pip/

WARNING: 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/pip/

WARNING: 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/pip/

WARNING: 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/pip/

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: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping

Requirement already up-to-date: pip in c:\users\victor.ciulei\appdata\roaming\python\python37\site-packages (20.0.2)
WARNING: 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: /simple/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 numpy 但是我遇到了同样的错误。

在Windows 10上使用Python 3.7。

1 个答案:

答案 0 :(得分:0)

重新安装Miniconda可以解决问题。