• 用pip install升级已安装的包的附加包, 以tabulate包为例


    用pip install升级已安装的附加包, 以tabulate包为例

    去pypi官网查看tabulate包的介绍, 发现tabulate 0.7.6才开始支持宽字符的美化打印.
    而且还需要安装它的附加包: widechars

    然而我的机器里的tabulate的版本是0.7.5.
    下面是升级步骤以及log记录:

    pip install --upgrade tabulate

    pip install tabulate[widechars]

    C:Documents and SettingsAdministrator>pip help install
    
    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.
    
    Install Options:
      -c, --constraint <file>     Constrain versions using the given constraints
                                  file. This option can be used multiple times.
      -e, --editable <path/url>   Install a project in editable mode (i.e.
                                  setuptools "develop mode") from a local project
                                  path or a VCS url.
      -r, --requirement <file>    Install from the given requirements file. This
                                  option can be used multiple times.
      -b, --build <dir>           Directory to unpack packages into and build in.
      -t, --target <dir>          Install packages into <dir>. By default this
                                  will not replace existing files/folders in
                                  <dir>. Use --upgrade to replace existing
                                  packages in <dir> with new versions.
      -d, --download <dir>        Download packages into <dir> instead of
                                  installing them, regardless of what's already
                                  installed.
      --src <dir>                 Directory to check out editable projects into.
                                  The default in a virtualenv is "<venv
                                  path>/src". The default for global installs is
                                  "<current dir>/src".
      -U, --upgrade               Upgrade all specified packages to the newest
                                  available version. The handling of dependencies
                                  depends on the upgrade-strategy used.
    
    
    C:Documents and SettingsAdministrator>pip  install --upgrade tabulate
    Collecting tabulate
      Downloading tabulate-0.7.7-py2.py3-none-any.whl
    Installing collected packages: tabulate
      Found existing installation: tabulate 0.7.5
        Uninstalling tabulate-0.7.5:
          Successfully uninstalled tabulate-0.7.5
    Successfully installed tabulate-0.7.7
    
    
    C:Documents and SettingsAdministrator>pip  install tabulate[widechars]
    Requirement already satisfied: tabulate[widechars] in d:anaconda2libsite-packages
    Collecting wcwidth; extra == "widechars" (from tabulate[widechars])
      Using cached wcwidth-0.1.7-py2.py3-none-any.whl
    Installing collected packages: wcwidth
    Successfully installed wcwidth-0.1.7
    
    
  • 相关阅读:
    Oracle载体服务器迁移后,数据一致性校验脚本
    六、HDFS
    五、集群配置
    2、【Hadoop HDFS】Does not contain a valid host:port authority: pc_node01:8082
    1、【Hadoop Yarn】 ./sbin/start-yarn.sh时,报错there is no YARN_RESOURCEMANAGER_USER defined
    一、Thread
    Centos安装KDE
    四、ssh免密登录
    cell_滑动
    aircrack-ng破解WiFi密码
  • 原文地址:https://www.cnblogs.com/duan-qs/p/6693669.html
Copyright © 2020-2023  润新知