Raspberrypi 2 Install or upgrade Python3.6

Since no chinese input method in my raspberrypi, i can only write with English.
Raspberrypi has python2. 7 and python3.4, but i want to upgrade to python3.6+.
Python3.6 support some new feature such as print(f'{name}') and x=1_000_242_200 expression.
How to upgrade ?

$ wget https://www.python.org/ftp/pyt ... 1.tgz 
$ tar zxvf Python-3.6.1.tgz $ cd Python-3.6.1

then run command:

$ sudo ./configure && sudo make && sudo make install

wait for about 20mins (low perf of raspberrypi :( )
then you run command:
it will using the new python3.6 version:

Python 3.6.1 (default, Jul 21 2019, 14:26:28) 
[GCC 4.9.2] on linux
Type "help", "copyright", "credits" or "license" for more information.

Enjoy it !

0 个评论