002_pip安装失败

一、安装cmdb的驱动遇到了如下问题

[root@localhost 003_pyenv]# pip2.7 install cmdb_sdk==0.3.1 -i http://cmdb.elenet.me/devops/devops --trusted-host cmdb.elenet.me
Collecting cmdb_sdk==0.3.1
Downloading http://cmdb.elenet.me/devops/devops/+f/3ae/a612c3ffe7e37/cmdb-sdk-0.3.1.tar.gz
Collecting requests (from cmdb_sdk==0.3.1)
Downloading http://cmdb.elenet.me/root/pypi/+f/5e4/32dcf5bd1e340/requests-2.13.0-py2.py3-none-any.whl
THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
requests from http://cmdb.elenet.me/root/pypi/+f/5e4/32dcf5bd1e340/requests-2.13.0-py2.py3-none-any.whl#md5=5e432dcf5bd1e3402ea1656700d99365 (from cmdb_sdk==0.3.1):
Expected md5 5e432dcf5bd1e3402ea1656700d99365
Got 200ec5c2dd75924de65ac779c4e0fb8f

二、把-i参数换成"--extra-index-url"即可。

[root@localhost 003_pyenv]# pip2.7 install cmdb_sdk==0.3.1 --extra-index-url http://cmdb.elenet.me/devops/devops --trusted-host cmdb.elenet.me
Collecting cmdb_sdk==0.3.1
Downloading http://cmdb.elenet.me/devops/devops/+f/3ae/a612c3ffe7e37/cmdb-sdk-0.3.1.tar.gz
Collecting requests (from cmdb_sdk==0.3.1)
Downloading requests-2.13.0-py2.py3-none-any.whl (584kB)
100% |████████████████████████████████| 593kB 647kB/s
Installing collected packages: requests, cmdb-sdk
Running setup.py install for cmdb-sdk ... done
Successfully installed cmdb-sdk-0.3.1 requests-2.13.0

三、

[root@localhost 003_pyenv]# pip2.7 install --help

Usage:
pip install [options] <requirement specifier> [package-index-options] ...
pip install [options] -r <requirements file> [package-index-options] ...
pip install [options] [-e] <vcs project url> ...
pip install [options] [-e] <local project path> ...
pip install [options] <archive url/path> ...

Description:
Install packages from:

- PyPI (and other indexes) using requirement specifiers.
- VCS project urls.
- Local project directories.
- Local or remote source archives.

pip also supports installing from "requirements files", which provide
an easy way to specify a whole environment to be installed.

---------------------------------------------------------------------------------

Package Index Options (including deprecated options):
-i, --index-url <url> Base URL of Python Package Index (default https://pypi.python.org/simple). This should point to a repository compliant with PEP 503 (the simple repository API) or a local directory laid out in the same
format.
--extra-index-url <url> Extra URLs of package indexes to use in addition to --index-url. Should follow the same rules as --index-url.

转载于:https://www.cnblogs.com/arun-python/p/6528766.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值