甘肃省建设工程安全质量监督管理局网站,门户网站大全,黄江网站设计,网站建设方案书 百度文库pip 是 Python 包管理工具#xff0c;该工具提供了对Python 包的查找、下载、安装、卸载的功能。 目前如果你在 python.org 下载最新版本的安装包#xff0c;则是已经自带了该工具。 Python 2.7.9 或 Python 3.4 以上版本都自带 pip 工具。pip 官网#xff1a;https://pypi…pip 是 Python 包管理工具该工具提供了对Python 包的查找、下载、安装、卸载的功能。 目前如果你在 python.org 下载最新版本的安装包则是已经自带了该工具。 Python 2.7.9 或 Python 3.4 以上版本都自带 pip 工具。pip 官网https://pypi.org/project/pip/ 你可以通过以下命令来判断是否已安装
pip --version
更新pip的版本
python -m pip install --upgrade pip
pip install django 安装包 pip uninstall django 卸载包
pip install -i https://mirrors.aliyun.com/pypi/simple/ django
推荐几个不错的国内镜像 阿里云https://mirrors.aliyun.com/pypi/simple/ 豆瓣https://pypi.douban.com/simple/ 清华大学https://pypi.tuna.tsinghua.edu.cn/simple/ 中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/
pip install --upgrade selenium 如果有就更新没有就安装 pip show selenium 查看是否已安装包如果已安装显示具体信息 pip list --outdated 查看需要更新的包有点慢 pip list 查看所有的包
其他主要用法
# pip --help 查看所有pip命令Usage: pipcommand[options]Commands:install 安装包.uninstall 卸载包.freeze 按着一定格式输出已安装包列表list 列出已安装包.show 显示包详细信息.search 搜索包类似yum里的search.wheel Buildwheelsfromyourrequirements.zip 不推荐.Zipindividualpackages.unzip 不推荐.Unzipindividualpackages.bundle 不推荐.Createpybundles.help 当前帮助.GeneralOptions:-h,--help 显示帮助.-v,--verbose 更多的输出最多可以使用3次-V,--version 现实版本信息然后退出.-q,--quiet 最少的输出.--log-filepath 覆盖的方式记录verbose错误日志默认文件/root/.pip/pip.log--logpath 不覆盖记录verbose输出的日志.--proxyproxy Specifyaproxyintheform[user:passwd]proxy.server:port.--timeoutsec 连接超时时间(默认15秒).--exists-actionaction Defaultactionwhenapathalreadyexists:(s)witch,(i)gnore,(w)ipe,(b)ackup.--certpath 证书.