# 进入存放项目的目录
$ pwd
/Users/darby/PycharmProjects
$ ll
total 0
drwxr-xr-x 14 darby staff 448B Apr 22 2024 LearnSpider
drwxr-xr-x 5 darby staff 160B Dec 12 16:05 OCR
drwxr-xr-x 30 darby staff 960B Dec 12 14:50 code
drwxr-xr-x 8 darby staff 256B Oct 21 17:20 rsas
# 进入某个项目的虚拟环境目录
$ cd OCR/venv
# 激活虚拟环境
$ source ./bin/activate
(venv)
# 激活虚拟环境后,会看到(venv)标识
# 退出虚拟环境
$ deactivate