1. 程式人生 > >pip安裝python 包

pip安裝python 包

img sts help get 超時時間 col 其他 latest 錯誤日誌

python3.6 裏邊沒有Pip module

其他方法都比較復雜,

通過下邊這種方法比較簡單

https://pip.pypa.io/en/stable/installing/

在這個網站中下載 To install pip, securely download get-pip.py. [2]

然後就可以在 python路徑的script路徑看到 pip和easy_install 程序了

技術分享

有了pip程序後,在powershell中打開

##可以采用pip list --outdate 查看有需要更新的package
PS C:\Users\tianwc\AppData\Local\Programs\Python\Python36\Scripts> pip list --outdate
DEPRECATION: The default format will switch to columns in the future. You can use --format=(legacy|columns) (or define a
format=(legacy|columns) in your pip.conf under the [list] section) to disable this warning.
beautifulsoup4 (4.3.2) - Latest: 4.5.3 [wheel]

然後 通過pip install --upgrade packagename就可以更新到最新版本

技術分享

其他的pip的一些函數

 1 # pip --help
 2  
 3 Usage:   
 4   pip <command> [options]
 5  
 6 Commands:
 7   install                     安裝包.
 8   uninstall                   卸載包.
 9   freeze                      按著一定格式輸出已安裝包列表
10   list                        列出已安裝包.
11 show 顯示包詳細信息. 12 search 搜索包,類似yum裏的search. 13 wheel Build wheels from your requirements. 14 zip 不推薦. Zip individual packages. 15 unzip 不推薦. Unzip individual packages. 16 bundle 不推薦. Create pybundles.
17 help 當前幫助. 18 19 General Options: 20 -h, --help 顯示幫助. 21 -v, --verbose 更多的輸出,最多可以使用3次 22 -V, --version 現實版本信息然後退出. 23 -q, --quiet 最少的輸出. 24 --log-file <path> 覆蓋的方式記錄verbose錯誤日誌,默認文件:/root/.pip/pip.log 25 --log <path> 不覆蓋記錄verbose輸出的日誌. 26 --proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port. 27 --timeout <sec> 連接超時時間 (默認15秒). 28 --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup. 29 --cert <path> 證書.

pip安裝python 包