首页 > 代码库 > pip安装python 包

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>               证书.

 

 

 

pip安装python 包