【发布时间】:2017-10-10 21:49:01
【问题描述】:
我正在使用远程服务器。当我尝试在我的虚拟环境中使用 pip 安装任何东西时,我收到一个错误:
(venv) [barta@bivoj program]$ pip install -r requirements.txt
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Collecting joblib==0.11 (from -r requirements.txt (line 1))
Could not fetch URL https://pypi.python.org/simple/joblib/: There was a problem confirming the ssl certificate: Can't connect to HTTPS URL because the SSL module is not available. - skipping
python 2.7 一切正常。我可以自己解决这个问题(我没有root权限)还是需要联系管理员?
首先我在我的主文件夹中安装 python 3.6 时遇到了这个问题。我认为问题可能是因为它在我的主文件夹中,所以我要求全新安装 python 3.6。
按照 Claudio 的建议,我考虑更改 setup.py 并在家中重新安装:
pip3 installs inside virtual environment with python3.6 failing due to ssl module not available
但我没有找到任何 openssl 文件夹。 /usr/bin 中有 openssl,但那不是目录。我搜索了 ssl.h 文件,但在任何地方都没有找到。
【问题讨论】:
-
你可以尝试用本地openssl构建本地python 3。或者只是要求管理员为您安装一个打包好的 python 3。