转载;http://blog.youkuaiyun.com/rumswell/article/details/8838356
pip:强大的Python包管理工具(A tool for installing and managing Python packages.)
Project Page: https://github.com/pypa/pip安装包(Install a package):
- $ pip install SomePackage==1.0
- [...]
- Successfully installed SomePackage
- $ pip show --files SomePackage
- Name: SomePackage
- Version: 1.0
- Location: /my/env/lib/pythonx.x/site-packages
- Files:
- ../somepackage/__init__.py
- [...]
列出所有过时的包(List what packages are outdated):
- $ pip list --outdated
- SomePackage (Current: 1.0 Latest: 2.0)
升级一个包(Upgrade a package):
- $ pip install --upgrade SomePackage
- [...]
- Found existing installation: SomePackage 1.0
- Uninstalling SomePackage:
- Successfully uninstalled SomePackage
- Running setup.py install for SomePackage
- Successfully installed SomePackage
卸载一个包(Uninstall a package:)
- $ pip uninstall SomePackage
- Uninstalling SomePackage:
- /my/env/lib/pythonx.x/site-packages/somepackage
- Proceed (y/n)? y
- Successfully uninstalled SomePackage
本文介绍了pip的强大功能,包括Python包的安装、显示已安装文件、列出过时的包、升级及卸载等操作。通过具体命令示例,读者可以快速上手使用pip进行高效的包管理。
1166

被折叠的 条评论
为什么被折叠?



