Python3.6在Ubuntu 14.04上失败了

时间:2018-04-12 13:36:24

标签: python-3.x pip ubuntu-14.04

我已按照http://docs.python-guide.org/en/latest/starting/install3/linux/

在运行Jenkins的Ubuntu机器上安装了Python3.6

安装后如果我运行python3.6,我什么也得不到。

如果我运行update-alternatives --config python3,我会得到:enter image description here

如果我选择3.6作为默认的Python3运行,然后运行pip3 -V我得到: enter image description here

但是如果我在选择Python3.4时运行pip3 -V它可以正常工作。

更新 我设法让Python3.6按照这个SO答案工作: Upgrading python3.4 to python3.6 on ubuntu breaks pip

然而pip3.6失败并带有以下内容: enter image description here

更新2 pip 3.6现在正在运行,但安装包提供了以下内容:

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

1 个答案:

答案 0 :(得分:0)

在回旋处理之后,以下工作:

wget https://raw.github.com/pypa/pip/master/contrib/get-pip.py

python3.4 get-pip.py

如果出现引用lsb_release的错误,请修改该文件(我的位于/usr/bin/lsb_release)并将#! /usr/bin/python3 -Es替换为#! /usr/bin/python2.7

在cd之后进入Python3.6.1目录并运行以下命令:

./configure --enable-optimizations

make -j8

make altinstall