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.
insert image description here
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

insert image description here
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

insert image description here

3 Pycharm modify Python version

3.1 View the installation path of the newly installed Python:whereis python

insert image description here

3.2 Modify the Python interpreter version

FIle>Setting, add interpreter:
insert image description here
perform the following steps in sequence
insert image description here

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 .

Refer to
the detailed explanation of the specified Python version for Ubuntu installation. In theory, all versions are common

Supongo que te gusta

Origin blog.csdn.net/wokaowokaowokao12345/article/details/128904642
Recomendado
Clasificación