技术栈

Centos7 一键安装python3.7

Centos,Python,System Os

来源: https://blog.csdn.net/big_data1/article/details/103496780

yum -y install wget &&  
yum -y groupinstall "Development tools" &&  
yum -y install zlib-devel libffi-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.7.2/Python-3.7.2.tar.xz &&  
mkdir /opt/python3 &&  
tar -xvJf  Python-3.7.2.tar.xz &&  
cd Python-3.7.2 &&  
./configure --prefix=/opt/python3 &&  
make &&  
make install &&  
ln -s /opt/python3/bin/python3 /usr/bin/python3 &&  
ln -s /opt/python3/bin/pip3 /usr/bin/pip3 &&  
yum -y install epel-release &&  
yum -y install python-pip  &&
python3 -m pip install virtualenv &&
/opt/python3/bin/virtualenv  /opt/venv3 &&
/opt/python3/bin/virtualenv -p /usr/bin/python2.7 /opt/venv2
点我评论
打赏本文
二维码


46

文章

22

标签