pip安装需要tls/ss

2024-06-06 12:28:22 发布

您现在位置:Python中文网/ 问答频道 /正文

我在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

Tags: pipthe服务器urlsslthatisvps
2条回答

引起更多人注意@Arduino嫒u Sentinel的评论

Sounds like you installed Python by running make, right ? In that case I'd recommend installing libssl-dev and rebuilding+reinstalling Python

在新的debian安装中,我通过

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安装任何东西,都会产生问题中的错误。

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

你应该试着安装你的软件包回购协议

sudo apt-get install python-pip

相关问题 更多 >