最小化安裝Python8后安裝Python3.8.1,網(wǎng)上找了一圈教程,沒有一個能完全成功的?;蛘吣馨惭b成功,但pip無法使用。最后根據(jù)多個教程整理了一份命令,測試成功,安裝使用完全沒有問題。
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
今天看了一下寶塔的安裝程序,發(fā)現(xiàn)用下面一行命令就可以快速安裝Python3.6
yum install python3 python3-devel -y
ln -sf /usr/bin/python3 /usr/bin/python
安裝完用下面的命令升級PIP就可以正常使用了。
pip3 install --upgrade pip
總結(jié)
以上所述是小編給大家介紹的Centos8(最小化安裝)全新安裝Python3.8+pip的方法教程,希望對大家有所幫助!