Python 包管理工具 pip

Summary: Author: 张亚飞 | 阅读时间: 1 minute read | Published: 2016-08-14
Filed under Categories: LinuxTags: Note,

Python 包管理工具 pip

pip install qiniu
pip install -i https://pypi.doubanio.com/simple/ qiniu

PyPI Mirror 查看镜像的活跃度.选择CN地区合适的镜像即可.

具体的配置方法如下

Using a mirror Single Usage:

pip install -i http://<mirror>/simple <package>

Global settings: Add *~/.pip/pip.conf * that includes: 在 ~/.pip/ 下创建文件 pip.conf(如果还没有的话),并填入以下内容:

* [global]
index-url = http://<mirror>/simple

如果报如下错误:

Collecting pip
  Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB)
    100% |████████████████████████████████| 1.3MB 846kB/s
Installing collected packages: pip
  Found existing installation: pip 8.1.2
    Not uninstalling pip at /usr/lib/python2.7/dist-packages, outside environment /usr
Successfully installed pip-8.1.2
You are using pip version 8.1.2, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

可使用如下命令升级:

sudo easy_install -U pip
  • pip refuses to upgrade ********************************************************************************************************************************************************************************************************

Comments

  • 牧马人 says: 2019-09-23 07:23:04

    江山代有才人出,各领风骚数百年.

Cor-Ethan, the beverage → www.iirii.com