这份 pip 备忘清单汇总了 Python 包管理的常用命令,涵盖安装、卸载、版本控制、依赖管理及镜像加速等操作,助你高效掌控开发环境。
| 命令 | 说明 |
|---|---|
pip install package_name | 安装指定的包 |
pip install requests-2.22.0-py2.py3-none-any.whl | 从本地的 wheel 文件安装包 |
pip install git+https://github.com/psf/requests.git | 从 Git 仓库安装包 |
pip install /home/user/src/requests | 从目录中安装包 |
pip uninstall package_name | 卸载指定的包 |
pip list | 查看已安装的包列表 |
pip show package_name | 查看某个包的详细信息 |
pip search keyword | 搜索 PyPI 包(新版 pip 已弃用,建议用 pypi.org) |