网站首页 美食营养 游戏数码 手工爱好 生活家居 健康养生 运动户外 职场理财 情感交际 母婴教育 时尚美容

mac python3创建虚拟环境

时间:2024-10-13 00:27:53

1、这里使用的是 mac 环境,首先安装 python3。mac 中自带 python2 的环境,如果想到安装 python3 ,输入 brew install python

mac python3创建虚拟环境

2、创建目录,mkdir .virtualenvs ,cd .virtualenvs。

mac python3创建虚拟环境

3、创建虚拟环境,执行python3 -m venv .venv,执行完后会自动安装 pip

mac python3创建虚拟环境

4、进入虚拟环境:source .venv/bin/activate。安装依赖:pip install xxxx。查看已经安装的库列表:pip list。移除 pip uninstall xxx。

mac python3创建虚拟环境
© 2025 一点资料
信息来自网络 所有数据仅供参考
有疑问请联系站长 site.kefu@gmail.com