设为首页 加入收藏

TOP

Python pip 常用命令
2017-10-10 21:05:43 】 浏览:2193
Tags:Python pip 常用 命令

查找需要安装的包

  pip search <包名>

安装python

  pip install 
  pip install <包名>==1.0.4 
  pip install -r requirements.txt 
  pip install <包名> -i http://pypi.mirrors.ustc.edu.cn/simple/ 
  pip install -e < local project path> (这个命令相当于pip install develop) 

  阿里源:http://mirrors.aliyun.com/pypi/simple/ 
  科大源:http://pypi.mirrors.ustc.edu.cn/simple/ 
  清华源:http://mirrors.tuna.tsinghua.edu.cn/pypi/simple 
  官方源:https://pypi.python.org/

在配置文件中指定安装源

  直接在配置文件中添加源,如果没有配置文件可以手动添加一个 
  /etc/pip.conf 
  [global] 
  timeout = 6000 
  index-url = http://pypi.douban.com/simple

列出已经安装的包

  pip list 
  pip freeze

列出本地可以editable的项目

  pip list -e

列出过期的包

  pip list -o

升级包

  pip install <包名> -U

安装的包所在目录

  pip show -f <包名> 
  pip show

 

卸载安装

  Uninstall packages. 

  pip is able to uninstall most installed packages. Known exceptions are: 

  Pure distutils packages installed with python setup.py install, which leave behind no metadata to >determine what files were installed. 

  Script wrappers installed by python setup.py develop. 

  pip also performs an automatic uninstall of an old version of a package before upgrading to a newer version.\ 

  pip uninstall <包名> 

  pip uninstall -y -r requirement.txt

 

】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Python基础(1):基本运算符 下一篇Python 3.6 性能测试框架Locust安..

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目