python3 -m venv test
切换指定文件夹
Windows:/Scripts/
macOS:/bin/
执行指令:`activate`
python2
python3
功能 | 指令 |
---|---|
查看 pip 版本 | pip -V |
查看帮助文档 | pip help |
查看包列表 | pip list |
导出包列表 | pip freeze |
安装 | pip install 包名 |
升级 | pip install -U 包名 |
卸载 | pip uninstall 包名 |
# 默认安装最新版本
$ pip install pytest
# 执行版本
$ pip install pytest==6.2.0
# 从文件清单中批量安装
$ pip install -r requirments.txt
# 文件格式
pytest==6.2.0
Faker==9.3.1
selenium==3.14.1
$ pip install -U pytest
# 卸载包
$ pip uninstall pytest
# 使用镜像
pip install pytest -i https://pypi.douban.com/simple
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。