Install Python 3.8.1 after minimally installing Python 8. I found a circle of tutorials on the Internet, and none of them can be completely successful. Or it can be installed successfully, but pip cannot be used. Finally, I compiled a command based on multiple tutorials. The test was successful and there was no problem with installation and use.
yum -y install wget
yum -y install setup
yum -y install perl
yum install openssl-devel -y
yum install zlib-devel -y
yum -y groupinstall "Development tools"
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel
yum install -y libffi-devel zlib1g-dev
yum install zlib*-y
yum install libffi-devel -y
wget https://www.python.org/ftp/python/3.8.1/Python-3.8.1.tar.xz
tar -xvJf Python-3.8.1.tar.xz
mkdir /usr/local/python3
cd Python-3.8.1./configure --prefix=/usr/local/python3 --enable-optimizations --with-ssl
make && make install
ln -s /usr/local/python3/bin/python3 /usr/local/bin/python3
ln -s /usr/local/python3/bin/pip3 /usr/local/bin/pip3
pip3 install --upgrade pip
I took a look at the pagoda installation program today and found that Python 3.6 can be quickly installed with the following line of commands
yum install python3 python3-devel -y
ln -sf /usr/bin/python3 /usr/bin/python
After installation, use the following command to upgrade PIP and it can be used normally.
pip3 install --upgrade pip
to sum up
The above is a tutorial for the new installation of Python3.8+pip for Centos8 (minimal installation) introduced by the editor. I hope it will be helpful to you!
Recommended Posts