Premise
The website provides the installation package on MAC and Windows and the required source code for Linux installation.
The download address is as follows:
https://www.python.org/downloads/release/python-360/
Installation
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tar.xzxz-d PYTHON-3.6.0.TAR.XZTAR-XVF PYTHON-3.6.0.TARCD Python-3.6.0./configuremakesudo make Install
Test:
$ python3.6--versionpython 3.6.0
To test several new syntax features:
1.
# formatted string literals>>> name = ' Ray ' >>> f ' Hello {name}. ' Hello Ray. '
Effect is equivalent to
>>> name = ' Ray ' >>> ' Hello {name}. ' Format (name=name) ' Hello Ray. '
2.
# underscores in Numeric literals>>> a = 1_000_000_000_000_000>>> a1000000000000000>>> ' {: _} '. Format (1000000) ' 1_000_000 ' 1_000_000 '
3.
# enum.auto>>> from enum import enum, Auto>>> class Color (enum): ... red = auto () ... blue = auto () ... gre En = auto () ...>>> list (Color) [<color.red:1>, <color.blue:2>, <color.green:3>]
Tips
After the first compilation of the installation, it is possible to find that the arrow keys fail after the input python3.6.
The reason is that the ReadLine library is not installed.
How to resolve:
Installing the ReadLine Library
sudo apt-get install Libreadline-dev
Once installed, then recompile the Python installation once.
CD Python-3.6.0./configuremakesudo make install
Summarize
The above is the entire content of this article, I hope that the content of this article on everyone's study or work can bring some help, if there are questions you can message exchange.