Centos8 (Minimal Installation) Tutorial on how to install Python3.8 + pip completely

  • 2021-07-24 11:57:26
  • OfStack

After minimizing the installation of Python8, install Python3.8. 1. I found a tutorial on the Internet, but none of them were completely successful. Or it can be installed successfully, but pip cannot be used. Finally, according to several tutorials, a command was compiled, and the test was successful, and there was no problem in 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

Today, I looked at the installation program of Pagoda 1, and found that you can quickly install Python 3.6 with the following command line


 yum install python3 python3-devel -y
 ln -sf /usr/bin/python3 /usr/bin/python

After installation, upgrade PIP with the following command, and it can be used normally.

pip3 install --upgrade pip

Summarize

Above is the site to introduce you Centos8 (Minimum Installation) new installation Python3.8 + pip method tutorial, I hope to help you!


Related articles: