Ubuntu installs the specified version of Python
1 Check the existing Python version
Check the installed Python version and switch between different versions in Ubuntu .
2 Take the installation of Python3.8.9 as an example
2.1 View the download link of the required version
Download link: https://www.python.org/ftp/python/ , find the required version (3.8.9) by yourself.
Step 1: Download
It can be downloaded in the Ubuntu system browser or wget. Take wget download as an example:
wget https://www.python.org/ftp/python/3.8.9/Python-3.8.9.tgz
Step 2: Unzip
the right mouse button and extract.
Step 3: Install, locate the terminal to the unzipped folder, and enter the commands in sequence
sudo make
sudo make install
2.2 Testing
3 Pycharm modify Python version
3.1 View the installation path of the newly installed Python:whereis python
3.2 Modify the Python interpreter version
FIle>Setting, add interpreter:
perform the following steps in sequence
Tip, the interpreter has been modified, and many packages need to be reinstalled. The Pycharm installation package can refer to the blog post: various problems encountered through the installation of the Pycharm installation package and the Matplotlib package .