我正在远程服务器上工作。当我尝试在虚拟环境中使用 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。
我考虑更改 setup.py 并在我家中再次安装,正如 Claudio 此处的建议:
pip3 在虚拟环境中安装,由于 ssl 模块不可用,python3.6 失败 https://stackoverflow.com/questions/41489439/pip3-installs-inside-virtual-environment-with-python3-6-failing-due-to-ssl-modul
但我没有找到任何 openssl 文件夹。 /usr/bin 中有 openssl,但那不是目录。我搜索了 ssl.h 文件,但没有在任何地方找到它。
听起来你已经从源代码构建了 python,但没有libssl-dev
展示。
Run:
sudo apt-get install libssl-dev
sudo ./configure
sudo make altinstall
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)