Install dependency packages
sudo apt-get install -y make build-essential libssl-dev zlib1g-dev
sudo apt-get install -y libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm
sudo apt-get install -y libncurses5-dev libncursesw5-dev xz-utils tk-dev
Find the corresponding version from the Python web page and click to download it.
sudo wget https://www.python.org/ftp/python/3.7.3/Python-3.7.3.tgz
Third, extract the
sudo tar -zxvf Python-3.7.3.tgz
Unzip it and enter the generated directory python-3.7.3
cd Python-3.7.3
Install and compile Python
sudo ./configure && sudo make && sudo make install
6. After installation, create/modify the existing soft connection.
create soft connection (first time)
sudo ln -f /usr/local/bin/python3.7 /usr/bin/python
sudo ln -f /usr/local/bin/pip3.7 /usr/bin/pip
Modify the soft connection (more than once)
sudo ln -sf /usr/local/bin/python3.7 /usr/bin/python
sudo ln -sf /usr/local/bin/pip3.7 /usr/bin/pip
Seven, print version test
python3 -V
pip3 -V
success
Read More:
- Raspberry pie set up to run Python program automatically
- How to login raspberry pie
- Several ways to check the IP address of raspberry pie
- Solution of apt unable to update in the docker container of raspberry pie
- A method to solve the error – 110 whilst initializing SD card of raspberry pie
- Solve the problem of raspberry pie using GStreamer. Importerror: cannot import name XXX introspection typelib not found
- Error: Command ‘arm linux gnueabihf GCC’ failed with exit status 1, raspberry pie install paramiko
- Raspberry pie 4B uses adafruit_ Pca9685 report error ioerror: [errno 121] remote I / O error solution
- Raspberry pie view IP address (command ifconfig) and exit Ping
- Raspberry pie startup self startup opencv program script and error analysis
- PIP3 upgrade tutorial of Python 3.5.2 under ubantu16
- CONDA upgrade command: upgrade CONDA, anaconda and various packages
- Solve the problem of unable to locate package python3.6 when upgrading from python3.5 to python3.6 in ubantu16.04
- It’s time to upgrade your parquet: IOException: totalvaluecount = = 0
- Raspberry Pi runs ubuntu-mate and reports Failed to start Load Kernel Modules error countermeasures
- Upgrade/reinstall win10 system–prompt the solution to fail to verify the key
- Can’t find Python executable “D:\python3\python.exe”, you can set the PYTHON env variable.
- About the reason why the Raspberry Pi raspistill command cannot find the camera
- Troubleshooting of Jenkins upgrade to 2.42 JUnit test report
- Mac upgrade pip