zoukankan      html  css  js  c++  java
  • 安装 SciPy 和 scikit-learn 升级pip 及pip基本命令表

      安装Scipy和scikit-learn出错,出错记录及当时最终解决办法

    问题:

     一、使用pip直接安装

      直接pip install scipy  

    C:UsersPlain>pip install scripy
    Collecting scripy
    Downloading Scripy-0.9.3.tar.gz
    Complete output from command python setup.py egg_info:Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "c:usersplainappdatalocal emppip-build-bqakt2scripysetup.py",line 96, in <module>
    description=get_description(packages[0], PACKAGE_DIR),
    File "c:usersplainappdatalocal emppip-build-bqakt2scripysetup.py",line 47, in get_description
    pkg = __import__(package, level=1)
    File "c:usersplainappdatalocal emppip-build-bqakt2scripylibscripy\__init__.py", line 11, in <module>
    from .edit import *
    File "c:usersplainappdatalocal emppip-build-bqakt2scripylibscripyedit.py", line 15, in <module>
    import pwd
    ImportError: No module named pwd

    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in c:usersplainappdatalocal emppip-build-bqakt2scripy

      显示错误后,也没有仔细分析问题原因,能力欠缺。

    解决:

    二、使用.whl文件安装

      在网站下载scipy.whl 软件http://www.lfd.uci.edu/~gohlke/pythonlibs/#scipy

      然后在msdos中直接:pip install (将下载好的.whl文件拖入即可)

      安装失败:显示:  

    C:UsersPlain>pip install C:UsersPlainDesktopscipy-0.17.1-cp27-cp27m-win_amd64.whl
    scipy-0.17.1-cp27-cp27m-win_amd64.whl is not a supported wheel on this platform.
    You are using pip version 7.1.2, however version 8.1.2 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.

      在刚才下载的网上查阅了关于安装有:Use pip version 8 or newer to install the downloaded .whl files.

      大意就是使用pip version 8 或者最新版本(我的是7.1.2,当时最新8.1.2),可能是pip过旧的原因

    解决续:

    三,升级pip,及部分pip命令学习

      按照上边的升级提示:

      python -m pip install --update pip

      果然最后显示:Successfully installed pip-8.1.2

      然后查看pip版本 使用pip -V

      如果命令出错会显示所有的pip 命令:

      

     1 C:UsersPlain>pip -v
     2 
     3 Usage:
     4   pip <command> [options]
     5 
     6 Commands:
     7   install                     Install packages.
     8   download                    Download packages.
     9   uninstall                   Uninstall packages.
    10   freeze                      Output installed packages in requirements format # 输出已安装的软件包的需求格式
    11   list                        List installed packages.     # 类似于freeze
    12   show                        Show information about installed packages.
    13   search                      Search PyPI for packages.
    14   wheel                       Build wheels from your requirements.
    15   hash                        Compute hashes of package archives.
    16   completion                  A helper command used for command completion
    17   help                        Show help for commands.
    18 
    19 General Options:
    20   -h, --help                  Show help.
    21   --isolated                  Run pip in an isolated mode, ignoring
    22                               environment variables and user configuration.
    23   -v, --verbose               Give more output. Option is additive, and can be
    24                               used up to 3 times.
    25   -V, --version               Show version and exit.
    26   -q, --quiet                 Give less output.
    27   --log <path>                Path to a verbose appending log.
    28   --proxy <proxy>             Specify a proxy in the form
    29                               [user:passwd@]proxy.server:port.
    30   --retries <retries>         Maximum number of retries each connection should
    31                               attempt (default 5 times).
    32   --timeout <sec>             Set the socket timeout (default 15 seconds).
    33   --exists-action <action>    Default action when a path already exists:
    34                               (s)witch, (i)gnore, (w)ipe, (b)ackup.
    35   --trusted-host <hostname>   Mark this host as trusted, even though it does
    36                               not have valid or any HTTPS.
    37   --cert <path>               Path to alternate CA bundle.
    38   --client-cert <path>        Path to SSL client certificate, a single file
    39                               containing the private key and the certificate
    40                               in PEM format.
    41   --cache-dir <dir>           Store the cache data in <dir>.
    42   --no-cache-dir              Disable the cache.
    43   --disable-pip-version-check
    44                               Don't periodically check PyPI to determine
    45                               whether a new version of pip is available for
    46                               download. Implied with --no-index.
    47 
    48 C:UsersPlain>pip -V
    49 pip 8.1.2 from c:python27libsite-packages (python 2.7)

    四、直接使用pip需要将pip添加到系统环境变量path中

    ----------------2016-7-24 12:29:40--

        source:

  • 相关阅读:
    scp 利用 ssh 协议 复制文件
    linux (fedora 28) 制作启动U盘,启动盘
    nc 命令使用详解
    env :让系统决定你命令的位置
    tali -f 和 tail -F 之间的区别
    斯诺克台球比赛规则 (Snooker)
    中式台球 规则 ( ChinaBilliards )
    美式九球比赛规则 (Nine-ball)
    Tmux 使用教程 on Fedora 28
    python 3.6 的 venv 模块
  • 原文地址:https://www.cnblogs.com/mxh1099/p/5699648.html
Copyright © 2011-2022 走看看