python ERROR: Command errored out with exit status 1:

在使用$$后端一键脚本时遇到这个错误,python在安装第三方库报错。可能是网络问题造成的,解决方法在下面更新 pip 后在执行脚本一次;

ERROR: Command errored out with exit status 1:
     command: /usr/bin/python2 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-2rUisu/pycparser/setup.py'"'"'; __file__='"'"'/tmp/pip-install-2rUisu/pycparser/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: /tmp/pip-install-2rUisu/pycparser/
    Complete output (17 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-2rUisu/pycparser/setup.py", line 65, in <module>
        cmdclass={'install': install, 'sdist': sdist},
      File "/usr/lib64/python2.7/distutils/core.py", line 112, in setup
        _setup_distribution = dist = klass(attrs)
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 269, in __init__
        _Distribution.__init__(self,attrs)
      File "/usr/lib64/python2.7/distutils/dist.py", line 287, in __init__
        self.finalize_options()
      File "/usr/lib/python2.7/site-packages/setuptools/dist.py", line 302, in finalize_options
        ep.load()(self, ep.name, value)
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2341, in load
        return self.resolve()
      File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2351, in resolve
        raise ImportError(str(exc))
    ImportError: 'module' object has no attribute 'check_specifier'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

解决方法

pip install --upgrade  pip     # 升级pip;
pip install setuptools    # 安装setuptools;

如果出现以下错误:

ERROR:Cannot uninstall 'requests'.It is a distutils installed project and thus we cannot acurately determine which files belog to it which would lead to only apartial uninstall.

解决方法

pip install --ignore-installed requests

人已赞赏
操作系统

vim 打开文件提示 E325:ATTENTION

2019-10-6 9:45:40

操作系统

MySQL ERROR 1133 (42000): Can't find any matching row in the user table

2019-10-8 8:57:13

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索