pip安裝python 包


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>               證書.

 

 

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM