• 欢迎访问运维搬运工网站,推荐使用最新版火狐浏览器和Chrome浏览器访问本网站。
  • 本站一年会员:100元 ,两年会员:180元 ,永久会员:380元
  • 这世界就是,一些人总在昼夜不停地运转,而另外一些人,起床就发现世界已经变了。
  • 本博客推广的是知识付费,用赞助的方式实现博客维护,不以赚钱为目的的博客

pip安装

用pip安装包的时候,提示无pip

[root@localhost ~]# pip install ipython
-bash: pip: 未找到命令

下载

https://pypi.python.org/packages/11/b6/abcb525026a4be042b486df43905d6893fb04f05aac21c32c638e939e447/pip-9.0.1.tar.gz#md5=35f01da33009719497f01a4ba69d63c9

安装

[root@localhost ~]# ll
总用量 1176
-rw-------. 1 root root 1209 6月 4 02:29 anaconda-ks.cfg
-rw-r--r-- 1 root root 1197370 9月 17 00:32 pip-9.0.1.tar.gz
[root@localhost ~]# tar zxf pip-9.0.1.tar.gz 
[root@localhost ~]# cd pip-9.0.1
[root@localhost pip-9.0.1]# python setup.py install
Traceback (most recent call last):
 File "setup.py", line 6, in <module>
 from setuptools import setup, find_packages
ImportError: No module named setuptools

ImportError: No module named setuptools 解决方案

[root@localhost pip-9.0.1]# wget http://pypi.python.org/packages/source/s/setuptools/setuptools-0.6c11.tar.gz
[root@localhost pip-9.0.1]# tar zxf setuptools-0.6c11.tar.gz 
[root@localhost pip-9.0.1]# cd setuptools-0.6c11
[root@localhost setuptools-0.6c11]# python setup.py build
[root@localhost setuptools-0.6c11]# python setup.py install

再次运行即可

[root@localhost pip-9.0.1]# python setup.py install
Installed /usr/lib/python2.7/site-packages/pip-9.0.1-py2.7.egg
Processing dependencies for pip==9.0.1
Finished processing dependencies for pip==9.0.1

查看pip使用帮助

[root@localhost ~]# pip --help

Usage: 
 pip <command> [options]

Commands:
 install Install packages.
 download Download packages.
 uninstall Uninstall packages.
 freeze Output installed packages in requirements format.
 list List installed packages.
 show Show information about installed packages.
 check Verify installed packages have compatible dependencies.
 search Search PyPI for packages.
 wheel Build wheels from your requirements.
 hash Compute hashes of package archives.
 completion A helper command used for command completion.
 help Show help for commands.

General Options:
 -h, --help Show help.
 --isolated Run pip in an isolated mode, ignoring environment variables and user configuration.
 -v, --verbose Give more output. Option is additive, and can be used up to 3 times.
 -V, --version Show version and exit.
 -q, --quiet Give less output. Option is additive, and can be used up to 3 times (corresponding to WARNING, ERROR, and CRITICAL logging levels).
 --log <path> Path to a verbose appending log.
 --proxy <proxy> Specify a proxy in the form [user:passwd@]proxy.server:port.
 --retries <retries> Maximum number of retries each connection should attempt (default 5 times).
 --timeout <sec> Set the socket timeout (default 15 seconds).
 --exists-action <action> Default action when a path already exists: (s)witch, (i)gnore, (w)ipe, (b)ackup, (a)bort.
 --trusted-host <hostname> Mark this host as trusted, even though it does not have valid or any HTTPS.
 --cert <path> Path to alternate CA bundle.
 --client-cert <path> Path to SSL client certificate, a single file containing the private key and the certificate in PEM format.
 --cache-dir <dir> Store the cache data in <dir>.
 --no-cache-dir Disable the cache.
 --disable-pip-version-check
 Don't periodically check PyPI to determine whether a new version of pip is available for download. Implied with --no-index.

 


运维搬运工 , 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权
转载请注明原文链接:pip安装
喜欢 (0)
[扫描二维码]
分享 (0)
大自然搬运工
关于作者:
不是路不平,而是你不行。到底行不行,看你停不停。只要你不停,早晚都能行。
发表我的评论
取消评论
表情 贴图 加粗 删除线 居中 斜体 签到

Hi,您需要填写昵称和邮箱!

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址