我已按照http://docs.python-guide.org/en/latest/starting/install3/linux/
在运行Jenkins的Ubuntu机器上安装了Python3.6安装后如果我运行python3.6,我什么也得不到。
如果我运行update-alternatives --config python3
,我会得到:
如果我选择3.6作为默认的Python3运行,然后运行pip3 -V
我得到:
但是如果我在选择Python3.4时运行pip3 -V
它可以正常工作。
更新 我设法让Python3.6按照这个SO答案工作: Upgrading python3.4 to python3.6 on ubuntu breaks pip
更新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
答案 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