• 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.

  • 相关阅读:
    spring常用注解
    P1255 数楼梯
    蓝桥杯 传纸条(动态规划)
    蓝桥杯 数的划分两种解法
    蓝桥杯 数独
    Elasticsearch05-批量增删改查
    Elasticsearch04-正排索引和倒排索引
    Elasticsearch03-Mapping和聚合
    Elasticsearch02-查询语法
    亿级流量多级缓存高并发系统架构实战
  • 原文地址:https://www.cnblogs.com/arun-python/p/6528766.html
Copyright © 2020-2023  润新知