Python文档有如下的介绍:
Python 在 3.5 版更改: 现在推荐使用 venv 来创建虚拟环境
# 创建名为 .venv 的虚拟环境
python3 -m venv .venv
# 激活虚拟环境
source .venv/bin/activate
# 退出虚拟环境
deactivate
查看当前目录的文件
$ tree -a
.
└── .venv
├── bin
│ ├── activate
│ ├── activate.csh
│ ├── activate.fish
│ ├── python -> python3
│ └── python3 -> /Users/.pyenv/versions/py370/bin/python3
├── include
├── lib
│ └── python3.7
│ └── site-packages
└── pyvenv.cfg