简体   繁体   中英

Python3.6 failing on Ubuntu 14.04

I've installed Python3.6 on a Ubuntu machine running Jenkins as per http://docs.python-guide.org/en/latest/starting/install3/linux/

After the install if I run python3.6 I get nothing.

If I run update-alternatives --config python3 I get: 在此处输入图片说明

If I select 3.6 to run as the default Python3 and then run pip3 -V I get: 在此处输入图片说明

However if I run pip3 -V while Python3.4 is selected it works fine.

Update I managed to get Python3.6 working as per this SO answer: Upgrading python3.4 to python3.6 on ubuntu breaks pip

However pip3.6 fails with the following: 在此处输入图片说明

Update 2 pip 3.6 is now working but installing a package gives the following:

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

After a roundabout approach the following worked:

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

python3.4 get-pip.py

If an error referring to lsb_release appears edit the file (mine was located at /usr/bin/lsb_release ) and replace #! /usr/bin/python3 -Es #! /usr/bin/python3 -Es with #! /usr/bin/python2.7 #! /usr/bin/python2.7

After that cd into the Python3.6.1 directory and run the following:

./configure --enable-optimizations

make -j8

make altinstall

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM