安装tldr出错ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for f

File "/tmp/pip-build-G9yO9Z/tldr/setuptools_scm-3.3.3-py2.7.egg/setuptools_scm/integration.py", line 9, in version_keyword
      File "/tmp/pip-build-G9yO9Z/tldr/setuptools_scm-3.3.3-py2.7.egg/setuptools_scm/version.py", line 66, in _warn_if_setuptools_outdated
    setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-G9yO9Z/tldr/
You are using pip version 8.1.2, however version 19.2.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

根据错误提示:

setuptools_scm.version.SetuptoolsOutdatedWarning: your setuptools is too old (<12)
    
            ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-G9yO9Z/tldr/

   You are using pip version 8.1.2, however version 19.2.1 is available.
   You should consider upgrading via the 'pip install --upgrade pip' command.

 这里出现两个问题:

第一需要你更新 pip 版本需要使用'pip install --upgrade pip' command.

第二是 setuptools 版本太旧,所以出现以下问题Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-G9yO9Z/tldr/,也是需要你更新 

(一)使用“pip install—upgrade pip”命令进行pip版本升级。

        [xiaokang@localhost ~]$ sudo pip install --upgrade pip

(二)使用“ pip install --upgrade setuptools”命令进行setuptools 版本升级。

      [xiaokang@localhost ~]$ sudo pip install --upgrade setuptools

解决完以上问题你就可以成功安装上tldr

[xiaokang@localhost ~]$ sudo pip install tldr
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tldr
  Using cached https://files.pythonhosted.org/packages/ff/bb/0870bf90ad1137172b3cc0758d18e99fd2325243139e0bb7652556c77e0e/tldr-0.5.tar.gz
Requirement already satisfied: six in /usr/lib/python2.7/site-packages (from tldr) (1.12.0)
Collecting termcolor (from tldr)
  Downloading https://files.pythonhosted.org/packages/8a/48/a76be51647d0eb9f10e2a4511bf3ffb8cc1e6b14e9e4fab46173aa79f981/termcolor-1.1.0.tar.gz
Collecting colorama (from tldr)
  Downloading https://files.pythonhosted.org/packages/4f/a6/728666f39bfff1719fc94c481890b2106837da9318031f71a8424b662e12/colorama-0.4.1-py2.py3-none-any.whl
Installing collected packages: termcolor, colorama, tldr
  Running setup.py install for termcolor ... done
  Running setup.py install for tldr ... done
Successfully installed colorama-0.4.1 termcolor-1.1.0 tldr-0.5

 

你可能感兴趣的:(知识点杂记,代码出错问题解决)