Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 723 Bytes

install-venv.md

File metadata and controls

44 lines (30 loc) · 723 Bytes

本文主要介绍如何安装Python的开发虚拟环境

Virtualenv

参考:https://virtualenv.pypa.io/en/latest/

python3 -m virtualenv <DIR>
source <DIR>/bin/activate

or

# 安装virtualenv
pip3 install virtualenv
# 设置PATH
export PATH="$HOME/Library/Python/3.9/bin/:$PATH"

# 进入项目目录
cd myproject
# 创建venv目录
virtualenv venv
# 启动
source venv/bin/activate

Venv

# python3 -m venv <DIR>
python3 -m venv venv
source venv/bin/activate

参考: