【问题标题】:Unable to install elastic beanstalk AWS无法安装弹性 beantalk AWS
【发布时间】:2018-08-27 06:51:07
【问题描述】:

我正在为 Django 服务器设置 aws 服务器。我已经成功安装了python3.5.1、pip和django。

按照 aws 文档,我正在运行以下命令:

pip 安装 awsebcli

我收到此错误:

Collecting awsebcli
  Using cached awsebcli-3.12.4.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-1eejewt6/awsebcli/setup.py", line 46, in <module>
        long_description=open('README.rst').read() + open('CHANGES.rst').read(),
      File "/usr/lib/python3.5/encodings/ascii.py", line 26, in decode
        return codecs.ascii_decode(input, self.errors)[0]
    UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 4092: ordinal not in range(128)

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-1eejewt6/awsebcli/

尝试打开和读取 rst 文件时发生类似错误。

Eb repo 可以在 here 找到。我尝试修复包中的错误并手动运行但没有成功。为什么官方repo有错误?我错过了什么吗?

【问题讨论】:

  • 将命令行选项 --upgrade 添加到您的 pip install 命令。这将升级 awsebcli 依赖项。
  • 我也这样做了,同样的错误
  • 仅供参考:查看此AWS forums 帖子。这在某些操作环境中似乎是个问题。

标签: amazon-web-services amazon-elastic-beanstalk


【解决方案1】:

我手动安装了位于here 的旧版本 (3.10.0),这个版本运行良好。

【讨论】:

  • 也可以用pip3 install awsebcli==3.10.0安装
  • 这是一种解决方法,但不能永远坚持使用旧版本。 Nikhil Prakash 的回答应该是被接受的。
【解决方案2】:

在版本 >= 3.10.3 的 awsebcli 包中,在 CHANGES.rst 中添加了一些更改,该更改在第 156 行有一个 unicode 字符“ã”。这导致在某些操作系统版本中安装时出现上述错误。

如果需要 awsebcli 版本 >= 3.10.3,则手动安装包,直到没有来自 aws 的官方解决方案。

关注this answer,了解如何手动安装包。

在安装之前删除 CHANGES.rst 文件中的 unicode 字符。 它会正常工作的。

【讨论】:

  • 在 3.10.3 版本中删除对圣保罗的 unicode 字符搜索,并将其改为“So”
【解决方案3】:

来自https://forums.aws.amazon.com/thread.jspa?messageID=897654&tstart=0我决定试试

export LC_ALL=en_US.UTF-8 并加载 README.rst 和 CHANGES.rst 文件不再引发编码错误。这样可以避免手动操作包文件。

【讨论】:

    【解决方案4】:

    错误在 changes.rst 和/或自述文件中。它们不是安装所必需的。所以打开文件,删除其内容并保存。通过转到文件夹并执行python setup.py install手动安装它

    【讨论】:

      【解决方案5】:

      在我的情况下,我发现我必须先安装 setuptools 通过执行 pip install setuptools 然后安装 awsebcli 成功。

      【讨论】:

        猜你喜欢
        • 2018-08-17
        • 1970-01-01
        • 2020-12-26
        • 2020-05-03
        • 2018-07-20
        • 2014-06-17
        • 2020-11-15
        • 1970-01-01
        • 2019-11-12
        相关资源
        最近更新 更多