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