Ubuntu16.04 version is the latest Python 3.x version 3.5.
The latest stable version 3.6 can be installed from the source code execution.
To install Python 3.6, run the following command:
# wget https://www.python.org/ftp/python/3.6.2/Python-3.6.2.tar.xz# tar -xvf Python-3.6.2.tar.xz# cd Python-3.6.2# ./configure# make#Make install if there is an error: can't decompress data;zlib not available indicates that the dependency is missing: zlib.
# Installation depends on zlib, zlib-devel#In ubuntu, zlib is called zlib1g, the corresponding zlib-devel is called zlib1g-dev$ sudo apt-get install zlib1g$ sudo apt-get install zlib1g-dev
When the installation is complete, use it to verify the location of the main binary file:
# which python3# python3 -V
If it is not the latest 3.6, restart the system.
Check Python 3 version in Linux
# python3
To exit the Python prompt, just type.
quit()
or
exit()
And press Enter.
Congratulations! Python 3.6 is now installed on your system.
When executing pip install:
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Need to install:
$ sudo apt-get install openssl$ sudo apt-get install libssl-dev
Re
$ sudo ./configure$ sudo make && make install
Recommended Posts