2.python3虚拟环境
python3虚拟环境
# 进入目录
cd my-probject
# 创建虚拟环境
python3 -m venv myvenv
激活虚拟环境
平台 | Shell | 用于激活虚拟环境的命令 |
---|---|---|
POSIX | bash/zsh | $ source |
fish | $ source |
|
csh/tcsh | $ source |
|
PowerShell Core | $ |
|
Windows | cmd.exe | C:> |
PowerShell | PS C:> |
关闭虚拟环境
deactivate