我使用的是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
当前回答
此问题是由于您的PC上缺少OpenSSL包。
如果pip install openpyxl也给出错误。
你可以通过以下站点安装OpenSSL(Win64 OpenSSL v1.1.1g)来解决这个问题:
slproweb.com/products/Win32OpenSSL.html
重新启动您正在使用的IDE,使更改生效。
其他回答
目前在Windows 10上的Anaconda提示符(Anaconda3)也有同样的问题。这里是解决方案:https://github.com/ContinuumIO/anaconda-issues/issues/10576
Windows 10, Windows 7 如果pip install在CMD提示符下不工作,使用Anaconda提示符运行它-它工作。
https://github.com/pypa/virtualenv/issues/1139
在Windows 10 SQL Server 19中,解决方案是已知的。
复制以下文件:
libssl-1_1-x64.dll libcrypto-1_1-x64.dll
从文件夹中
C:\Program Files\Microsoft SQL Server\MSSSQL15。MSSQLSERVER \ PYTHON_SERVICES \图书馆\ bin
到文件夹
C:\Program Files\Microsoft SQL Server\MSSSQL15。MSSQLSERVER \ PYTHON_SERVICES \ dll
然后打开一个新的DOS命令shell提示符。
从https://learn.microsoft.com/en-us/sql/machine-learning/troubleshooting/known-issues-for-sql-server-machine-learning-services?view=sql-server-ver15 # 7 -不-安装- python包-使用- pip -后-安装- sql - server - windows - 2019
这就是默认ssl设置的问题。你需要下载Python3并将路径添加到你的系统中。如果使用Pycharm,请将解释器设置为python3路径。然后可以正常使用pip3而不会出现错误。
我遇到了这个问题!我不小心安装了32位版本的Miniconda3。确保你选择的是64位版本!