1.安装依赖库
yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make xz-devel gcc-c++ python-devel cyrus-sasl-plain cyrus-sasl-devel cyrus-sasl-gssap
2.下载编译安装python3
wget https://www.python.org/ftp/python/3.6.8/Python-3.6.8.tgz
tar -zxvf Python-3.6.8.tgz && cd Python-3.6.8 && ./configure && make && make install
3.创建python3虚拟环境
mkdir /usr/local/thirdparty && cd /usr/local/thirdparty
python3 -m venv virtualenv_name #python3 环境
pip install virtualenv
virtualenv -p /usr/bin/python2.7 supervisor # python2环境
pip install -r requirements.txt # 安装依赖文件
pip freeze >requirements.txt # 生成依赖文件
yum install python36
mkdir ~/.pip && touch ~/.pip/pip.conf
cat << EOF |sudo tee -a ~/.pip/pip.conf [global] index-url = https://pypi.tuna.tsinghua.edu.cn/simple/ [list] format=columns EOF
Shylin
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。