Home > Article > Backend Development > How to install python3 on linux
How to install python3 on Linux?
Configure and install python3 under Linux
1. First, download the required version of python3 from the official website.
Recommended: "python tutorial"
(1) Method 1
wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz
If you want to download to that folder, enter that folder first Next——cd /home/download
(2) Method 2
After downloading the compressed package from the official website, place it in the main folder
2. Then, Unzip the file》
tar -xvf Python-3.6.0.tgz -C /usr/local
3. Create the path to the installation file.
mkdir /usr/local/python3
4. Compile.
./configure --prefix=/usr/local/python3
(The path at this time should be under Python-3.7.0)
5. Installation.
1, make
2, make install
3, completed
(The path at this time should be under Python-3.7.0)
6. Create a new version of the soft connection.
1. Modify the old version
mv /usr/bin/python /usr/bin/python_bak
2. Create a new soft link
ln -s /usr/local/python3/bin/python3 /usr/bin/python
3. Check the python version
python -V python-3.6.0
Soft link created successfully
The above is the detailed content of How to install python3 on linux. For more information, please follow other related articles on the PHP Chinese website!