我使用的是Python 3.6。当我尝试使用pip3安装“模块”时,我遇到了这个问题:

pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available

当前回答

Windows 10 如果你想在正常的cmd中使用pip,而不仅仅是在Anaconda提示符中。您需要添加3个环境路径。 比如:

D:\Anaconda3 
D:\Anaconda3\Scripts
D:\Anaconda3\Library\bin 

大多数人只添加D:\Anaconda3\Scripts

其他回答

在我的例子中,我重新安装了Python。这就解决了问题。

brew reinstall python

我遇到了这个问题!我不小心安装了32位版本的Miniconda3。确保你选择的是64位版本!

此问题是由于您的PC上缺少OpenSSL包。

如果pip install openpyxl也给出错误。

你可以通过以下站点安装OpenSSL(Win64 OpenSSL v1.1.1g)来解决这个问题:

slproweb.com/products/Win32OpenSSL.html

重新启动您正在使用的IDE,使更改生效。

Windows 10 如果你想在正常的cmd中使用pip,而不仅仅是在Anaconda提示符中。您需要添加3个环境路径。 比如:

D:\Anaconda3 
D:\Anaconda3\Scripts
D:\Anaconda3\Library\bin 

大多数人只添加D:\Anaconda3\Scripts

为我工作。

sudo apt-get install libssl-dev

使用此选项为pip启用ssl。 如果有人遇到问题请告诉我。