Python虚拟环境

1. 进入你的项目目录

1
cd 

2. 创建虚拟环境

1
python3 -m venv myenv
  • myenv为环境名称

3. 激活虚拟环境

1
source myenv/bin/activate