Linux pip安裝使用詳解

來源:互聯網
上載者:User

標籤:

簡介

pip是Python有它自己的包管理工具,與yum和apt-get相似。

 

安裝步驟:

1、下載get-pip.py:https://bootstrap.pypa.io/get-pip.py

2、以root使用者運行命令:python get-pip.py,即可完成安裝。


    使用詳解

1、pip安裝軟體

# pip install SomePackage  [...]  Successfully installed SomePackage
2、pip查看已安裝的軟體
# pip show --files SomePackage  Name: SomePackage  Version: 1.0  Location: /my/env/lib/pythonx.x/site-packages  Files:   ../somepackage/__init__.py   [...]
3、pip檢查哪些軟體需要更新
# pip list --outdated  SomePackage (Current: 1.0 Latest: 2.0)

4、pip升級軟體

# pip install --upgrade SomePackage  [...]  Found existing installation: SomePackage 1.0  Uninstalling SomePackage:    Successfully uninstalled SomePackage  Running setup.py install for SomePackage  Successfully installed SomePackage

5、pip卸載軟體

$ pip uninstall SomePackage  Uninstalling SomePackage:    /my/env/lib/pythonx.x/site-packages/somepackage  Proceed (y/n)? y  Successfully uninstalled SomePackage

 

使用執行個體

安裝flask

 

常見錯誤解決

參考《ImportError No module named setuptools解決》

Linux pip安裝使用詳解

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.