我使用的是Python 3.6。当我尝试使用pip3安装“模块”时,我遇到了这个问题:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
我使用的是Python 3.6。当我尝试使用pip3安装“模块”时,我遇到了这个问题:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available
当前回答
在我的例子中,我重新安装了Python。这就解决了问题。
brew reinstall python
其他回答
Windows 10, Windows 7 如果pip install在CMD提示符下不工作,使用Anaconda提示符运行它-它工作。
https://github.com/pypa/virtualenv/issues/1139
这招对我很管用:
yum install python36-pyOpenSSL
Python版本和包管理器可能不同。
对于未来试图解决这个问题的Oracle Linux用户,下面是对我有用的方法。 首先安装缺少的库:
yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel
readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
然后cd到Python3。X库并运行:
make
make install
我也有同样的问题,这是因为我改变了环境的文件夹。 我只是移除了env,重新安装了所有东西。
在尝试自己编译python后,仍然缺乏ssl模块,我最终尝试从apt安装缺少的模块,就像这样:
安装python3-openssl