程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

Python (II) -- use of Pip

編輯:Python

List of articles

  • Python( Two )——pip Use

Python( Two )——pip Use

Introduce

pip It's a modern , General purpose Python Package management tools . Provide for the right to Python Bag search 、 download 、 install 、 Uninstalled features , It's convenient for us to treat Python Management of resource packages .pip Built in to Python 3.4 and 2.7 And above , Other versions need to be installed separately .

pip Official documents :https://pip.pypa.io/en/stable/

install pip

In the installation Python when , Check on the interface pip One column , Will automatically download and install pip

see pip Version information for

Command line input pip -V see pip Version information for :

If the version number does not appear, you need to configure it manually scripts environment variable .

pip Use

pip Command to use :

pip install package_name Install the specified package
pip uninstall package_name Uninstall the specified package
pip list List installed packages
pip list -o Check the installed packages , What needs to be upgraded
pip check Check whether there are version conflicts in all installed packages
pip check package_name Check the compatibility of the specified package
pip freeze Displays installed packages in the specified format
pip show (-f) package_name View the specified package information

Using examples :

install ipython package :

pip install ipython

List installed packages :

pip list

View the specified package information :

pip show ipython

If you add -f Option lists the package details .

modify pip Download source

function pip install The command will download the specified python package , The default is https://files.pythonhosted.org/ Download it on the website . This is a foreign website , When the network situation is bad , The download may fail , We can order , Specify a domestic source to install a package , for example :

Download using Douban source

pip install -i https://pypi.douban.com/simple/ package_name

Domestic sources :

  • tsinghua :https://pypi.tuna.tsinghua.edu.cn/simple

  • Alibaba cloud :http://mirrors.aliyun.com/pypi/simple/

  • University of science and technology of China https://pypi.mirrors.ustc.edu.cn/simple/

  • Huazhong University of technology :http://pypi.hustunique.com/

  • Shandong University of technology :http://pypi.sdutlinux.org/

  • douban :http://pypi.douban.com/simple/


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved