1. Update the Raspberry Pi system
1 sudo apt-get update 2 sudo apt-get upgrade
2. Install the python-dependent environment
1 sudo apt-get install build-essential libsqlite3-dev sqlite3 bzip2 libbz2-dev
3. Download and extract the source code version python3.6
1 wget https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz 2 tar zxvf Python-3.6.1.tgz
4. Install compilation
1 cd Python-3.6.1 2 sudo ./configure 3 sudo make 4 sudo make install
5. Check the installation
1 ls -in / usr / local / bin / python *
Express install compile successfully!