我使用的是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
当前回答
我简单地用以下命令解决了这个问题:
Brew升级python@3.9
这个版本默认包含SSL !
其他回答
对于OpenSUSE,以同样的方式,但对上面列出的包做了一些更改:
zypper install zlib-devel libopenssl-devel ncurses-devel sqlite3-devel readline-devel tk-devel gdbm-devel libpcap-devel xz-devel
然后cd到Python源代码dir和
make
make install
or
make
make altinstall
也许
ln -s /usr/local/lib64/python3.6/lib-dynload/ /usr/local/lib/python3.6/lib-dynload
应该为OpenSUSE用户执行。请参见Python 3.7安装无法在openSUSE Leap 42.3上工作
只要尝试通过Anaconda提示安装即可
进入Anaconda提示符并输入(如果你有python3。X安装在你的引擎上):
py -m pip install pymysql
我也有同样的问题,这个解决了我的问题。之后,您可以在power shell或任何其他提示符中导入pymysql。
在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
先安装openssl。
如果你在conda环境中遇到这个问题,你可以安装openssl 使用conda install -c anaconda openssl。它为您启用ssl !