# 更新源
sudo yum install epel-release
# 更新源
sudo yum update
# 安装python3
sudo yum install python3
# 验证
python3 -V
# 安装
sudo yum install python3-pip
# 升级
python3 -m pip install --upgrade pip
sudo pip3 install virtualenv
sudo pip3 install virtualenvwrapper
# 创建工程文件夹
mkdir py-test
cd py-test
# 创建 注意virtualenv所在目录
/usr/local/python3/bin/virtualenv venv
创建requirements.txt,内容如下
# 根据项目需要填写依赖库
flask
pymysql
pip3 install -r requirements.txt
查看安装的依赖
pip freeze
python3 test.py