python - pip 安装需要 tls/ssl

标签 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

最佳答案

呼吁更多关注@Arduino_Sentinel 的评论

Sounds like you installed Python by running make, right ? In that case I'd recommend installing libssl-dev and rebuilding+reinstalling 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 安装任何东西会产生问题中的错误。

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

The main problem is you compiling python before install the libssl.

关于python - pip 安装需要 tls/ssl,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41098252/

相关文章:

python - 在 Julia 中将整数数组转换为字符数组,反之亦然

linux - 从尾部匹配 awk 时增加变量

linux - cut 操作 - 奇怪的行为

java - weblogic.management.provider.EditSaveChangesFailedException :

python - 让 Fabric Python 库工作

python - 在 Python 的一行中覆盖全局变量?

python - 在将文本向量参数输入到 sklearn 之前,如何将其与其他参数组合?

centos - 无法在 unix 上使用 python 安装 pip

javascript - 无法通过 Flask-socketIO 服务器在 HTML 客户端中显示来自 Python 客户端的视频流

ubuntu - 无法通过 apt-get 在我的 Ubuntu 9.04 上安装 pip