zoukankan      html  css  js  c++  java
  • 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.

  • 相关阅读:
    Python中所有的关键字
    关于selenium的8种元素定位
    对提示框的操作
    selenium+webservice进行百度登录
    MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled...报错解决
    Vue中使用echarts
    npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142解决方法
    插入排序
    冒泡排序优化
    roject 'org.springframework.boot:spring-boot-starter-parent:XXX' not found 解决
  • 原文地址:https://www.cnblogs.com/arun-python/p/6528766.html
Copyright © 2011-2022 走看看