awsebcli NameError pip安装突然失败:未定义名称'platform_system'

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了awsebcli NameError pip安装突然失败:未定义名称'platform_system'相关的知识,希望对你有一定的参考价值。

我有一个通过Shippable部署的Node应用程序。几周前,我的构建在没有任何环境变化的情况下开始失败(10/15/19是最后一次成功构建)

我正在部署到Node v 6.11.5,并且在awsebcli安装上失败

CI / CD管道需要AWS Elastic Beanstalk CLI,当我在不久前进行设置时,我发现我们需要下面的特定版本才能使所有版本都可以与此Node版本一起使用

pip install --force-reinstall awsebcli==3.14.5是失败的行,并带有错误

NameError:名称'platform_system'未定义

我想我只是希望针对其他版本的awsebcli,但我似乎不知道该怎么办

和完整的错误日志...

Downloading/unpacking docker-compose>=1.21.2,<1.22.0 (from awsebcli==3.14.5)
Downloading/unpacking blessed>=1.9.5 (from awsebcli==3.14.5)
Cleaning up...
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 278, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1266, in prepare_files
    req_to_install.extras):
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2291, in requires
    dm = self._dep_map
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2484, in _dep_map
    self.__dep_map = self._compute_dependencies()
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2517, in _compute_dependencies
    common = frozenset(reqs_for_extra(None))
  File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2514, in reqs_for_extra
    if req.marker_fn(override={'extra':extra}):
  File "/usr/share/python-wheels/setuptools-3.3-py2.py3-none-any.whl/_markerlib/markers.py", line 113, in marker_fn
    return eval(compiled_marker, environment)
  File "<environment marker>", line 1, in <module>
NameError: name 'platform_system' is not defined
答案

setuptools-3.3 was released in 2014!必须确保升级:

pip install --upgrade setuptools

以上是关于awsebcli NameError pip安装突然失败:未定义名称'platform_system'的主要内容,如果未能解决你的问题,请参考以下文章

NameError:名称'pip_install'未定义[重复]

pip 的正确使用方法

拥抱脸:NameError:未定义名称“句子”

无法使用 python27 命令行找到版本或使用 pip

AWSEBCLI 不读取环境变量

在 ubuntu 中安装 AWS elasticbeanstalk 命令行工具:error The 'awsebcli==3.10.0' distribution was not found and