我正在使用Debian 9,我已经安装了Python 3.6.2和pip 9.0.1。 当我想安装像numpy,scipy或matplotlib这样的模块时,仍有问题。 使用pip install命令时,我总是遇到以下错误:
pip配置了需要TLS / SSL的位置,但Python中的ssl模块不可用。 收集numpy无法获取URL https://pypi.python.org/simple/numpy/ :确认ssl证书时出现问题:无法连接到HTTPS URL,因为SSL模块不可用。 - 跳过无法找到满足要求numpy的版本(来自版本:)没有找到numpy的匹配分发
我尝试了这个主题的最佳答案( pip安装失败,出现“连接错误:[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:598)” )但它没有用。 实际上,我得到了相同的错误消息。
不幸的是,这个命令也是失败的。
pip install --index-url = http://pypi.python.org/simple/numpy --trusted-host pypi.python.org numpy
我希望有人能够解决我的问题。 在此先感谢您的帮助。 :d
I'm using Debian 9 and I have installed Python 3.6.2 and pip 9.0.1. Still, there is a problem when I want to install modules like numpy, scipy or matplotlib. I always get the following error when I use the pip install command:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available. Collecting numpy Could not fetch URL https://pypi.python.org/simple/numpy/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping Could not find a version that satisfies the requirement numpy (from versions: ) No matching distribution found for numpy
I tried the top answer of this subject (pip install fails with "connection error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:598)") but it didn't work. In fact, I get the same error message.
Unfortunately, this command was a fail as well.
pip install --index-url=http://pypi.python.org/simple/numpy --trusted-host pypi.python.org numpy
I hope someone will be able to solve my problem. Thanks in advance for your help. :D
最满意答案
在Python-3.6.2 / Modules / Setup中取消注释209-212行
SSL=/usr/local/ssl _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL)/lib -lssl -lcrypto
确保已安装libssl-dev
转到Python目录并执行./configure,make和make install
使用以下命令安装软件包: pip install --trusted-host pypi.python.org packageName
希望有人帮助过。 :d
Uncomment lines 209-212 in Python-3.6.2/Modules/Setup
SSL=/usr/local/ssl _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL)/lib -lssl -lcrypto
Make sure libssl-dev is installed
Go to your Python directory and do ./configure, make, and make install
Install packages with the following command: pip install --trusted-host pypi.python.org packageName
Hope that helped someone. :D
更多推荐
发布评论