准备依赖环境
yum -y install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make libffi-devel expat-devel expat-devel gdbm-devel
1、下载
wget https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz
2、解压
tar -zxvf Python-3.7.6.tgz
3、建空文件夹
mkdir /usr/local/python3
4、执行配置文件,编译,编译安装
cd Python-3.7.6
./configure --prefix=/usr/local/python3
make && make install
5、建立软链接
ln -s /usr/local/python3/bin/python3.7 /usr/bin/python3
ln -s /usr/local/python3/bin/pip3.7 /usr/bin/pip3
6、安装virtualenv
pip3 install virtualenv -i https://mirrors.aliyun.com/pypi/simple
7、建立软连接
ln -s /usr/local/python3/bin/virtualenv /usr/bin/virtualenv
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END
请登录后查看评论内容