我们知道python中有着许多包的存在,那么在安装和管理的工具上,我们可以使用pip来完成。当然python安装包的工具有很多中类型,本篇着重于pip的讲解,下面我们就来一起看看它是如何对包进行管理的吧。
1、说明
pip是一个安装和管理Python包的工具,python安装包的工具有easy_install, setuptools, pip,distribute等。而pip是easy_install的替代品。pip作为包管理器。这意味着它是一个工具,允许你安装和管理不属于标准库的其他库和依赖。
2、使用
安装后在命令行中键入:pip+ 回车,就会出现如下使用说明:
Usage: pip<command>[options] Commands: installInstallpackages. downloadDownloadpackages. uninstallUninstallpackages. freezeOutputinstalledpackagesinrequirementsformat. listListinstalledpackages. showShowinformationaboutinstalledpackages. checkVerifyinstalledpackageshavecompatibledependencies. configManagelocalandglobalconfiguration. searchSearchPyPIforpackages. wheelBuildwheelsfromyourrequirements. hashComputehashesofpackagearchives. completionAhelpercommandusedforcommandcompletion. helpShowhelpforcommands. GeneralOptions: -h,--helpShowhelp. --isolatedRunpipinanisolatedmode,ignoringenvironmentvariablesanduserconfiguration. -v,--verboseGivemoreoutput.Optionisadditive,andcanbeusedupto3times. -V,--versionShowversionandexit. -q,--quietGivelessoutput.Optionisadditive,andcanbeusedupto3times(correspondingto WARNING,ERROR,andCRITICALlogginglevels). --log<path>Pathtoaverboseappendinglog. --proxy<proxy>Specifyaproxyintheform[user:passwd@]proxy.server:port. --retries<retries>Maximumnumberofretrieseachconnectionshouldattempt(default5times). --timeout<sec>Setthesockettimeout(default15seconds). --exists-action<action>Defaultactionwhenapathalreadyexists:(s)witch,(i)gnore,(w)ipe,(b)ackup, (a)bort). --trusted-host<hostname>Markthishostastrusted,eventhoughitdoesnothavevalidoranyHTTPS. --cert<path>PathtoalternateCAbundle. --client-cert<path>PathtoSSLclientcertificate,asinglefilecontainingtheprivatekeyandthe certificateinPEMformat. --cache-dir<dir>Storethecachedatain<dir>. --no-cache-dirDisablethecache. --disable-pip-version-check Don'tperiodicallycheckPyPItodeterminewhetheranewversionofpipisavailablefor download.Impliedwith--no-index. --no-colorSuppresscoloredoutput
以上就是python pip的内容分享,相信大家已经知道pip命令的使用了,希望对初学python的人有所帮助。更多Python学习推荐:PyThon学习网教学中心
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)