Linux: Install the python3 source package | download - use

Visit python official website

Welcome to Python.org

After entering, pull to the bottom

 

Click to download the archive package

 After downloading, pass it to Linux

 tar xfz Python-3.11.4.tgz -C /usr/src/

 

 cd /usr/src/Python-3.11.4/

 Do not move it under this file

prepare the environment

yum -y install gcc make

 

Execute in this directory

./configure --prefix=/usr/local/python3

make

make install

ln -s /usr/local/python3/bin/* /usr/bin/ 

Just enter python3 to start or use it

 

 

Guess you like

Origin blog.csdn.net/w14768855/article/details/131294300