pip install需要tls / ssl

时间:2016-12-12 10:01:29

标签: python linux pip vps

我的OVH vps服务器kubuntu 14.04桌面上安装python时出现问题。我需要做什么 ?

 :~/Desktop# python get-pip.py
    pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
    Collecting pip
      Could not fetch URL https://pypi.python.org/simple/pip/: 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 pip (from versions: )
    No matching distribution found for pip

2 个答案:

答案 0 :(得分:2)

您应该尝试从包repos中安装

sudo apt-get install python-pip

答案 1 :(得分:1)

更多关注@Arduino_Sentinel的评论

  

听起来你通过运行make来安装Python,对吗?在这种情况下,我建议安装libssl-dev并重建+重新安装Python

在新的debian安装上,我通过

安装了Python 3.6
wget https://www.python.org/ftp/python/3.6.3/Python-3.6.3.tgz
tar xvf Python-3.6.3.tgz
cd Python-3.6.3
./configure
make
make altinstall

使用virtualenv -p python3.6 env创建virtualenv,然后尝试使用env/bin/pip安装任何内容会产生问题中的错误。

上面引用的评论解决了我服务器上的问题。