由于ssl错误,无法在python 3.6中pip安装包

Tom*_*83B 9 python ssl

我正在使用远程服务器.当我尝试在我的虚拟环境中使用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
Run Code Online (Sandbox Code Playgroud)

使用python 2.7一切正常.我可以自己解决这个问题(我没有root权限)或者我是否需要联系管理员?

首先,当我在我的主文件夹中安装python 3.6时,我遇到了这个问题.我想问题可能是因为它在我的主文件夹中,所以我要求干净安装python 3.6.

我考虑更改setup.py并再次安装在我的家中,正如Claudio所建议的那样:

由于ssl模块不可用,pip3安装在虚拟环境中,python3.6失败

但我没有找到任何openssl文件夹./ usr/bin中有openssl,但这不是目录.我搜索了ssl.h文件,但没有在任何地方找到它.

Igo*_*ato 9

听起来你已经从源代码创建了python而没有libssl-dev现在.

跑:

sudo apt-get install libssl-dev
sudo ./configure
sudo make altinstall
Run Code Online (Sandbox Code Playgroud)