python3和pip3、pip脚本一键安装

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/Martind/article/details/79575965

建立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


展开阅读全文

没有更多推荐了,返回首页