Python 包安裝和管理工具:pip
pip 是安裝和管理 Python 包的工具。
快速入門
安裝一個包:
$ 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)
升級一個包:
$ pip install --upgrade SomePackage [...] Found existing installation: SomePackage 1.0 Uninstalling SomePackage: Successfully uninstalled SomePackage Running setup.py install for SomePackage Successfully installed SomePackage
卸載一個包:
$ pip uninstall SomePackage Uninstalling SomePackage: /my/env/lib/pythonx.x/site-packages/somepackage Proceed (y/n)? y Successfully uninstalled SomePackage
本文由用戶 jopen 自行上傳分享,僅供網友學習交流。所有權歸原作者,若您的權利被侵害,請聯系管理員。
轉載本站原創文章,請注明出處,并保留原始鏈接、圖片水印。
本站是一個以用戶分享為主的開源技術平臺,歡迎各類分享!