欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

python3和pip3、pip脚本一键安装教程

程序员文章站 2023-03-02 08:34:19
建立python.sh文件 然后粘贴下面的内容 yum -y install wget && yum -y groupinstall "Developme...

建立python.sh文件

然后粘贴下面的内容

yum -y install wget &&
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 &&
wget https://www.python.org/ftp/python/3.5.5/Python-3.5.5.tar.xz &&
mkdir /usr/local/python3 &&
tar -xvJf  Python-3.5.5.tar.xz &&
cd Python-3.5.5 &&
./configure --prefix=/usr/local/python3 &&&
make && make install &&
ln -s /usr/local/python3/bin/python3 /usr/bin/python3 &&
ln -s /usr/local/python3/bin/pip3 /usr/bin/pip3 &&
sudo yum -y install epel-release &&
sudo yum -y install python-pip 

然后

sh python.sh