我尝试在ebcli之后安装awscli,他们都破了。目前,如果我键入aws s3 ls,它只是挂起而没有响应,如果我尝试使用eb,我会收到此错误:
Traceback (most recent call last):
File "/usr/local/bin/eb", line 11, in <module>
load_entry_point('awsebcli==3.8.4', 'console_scripts', 'eb')()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 565, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2631, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2291, in load
return self.resolve()
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2297, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/dist-packages/ebcli/core/ebcore.py", line 43, in <module>
from . import ebglobals, base, io, hooks
File "/usr/local/lib/python2.7/dist-packages/ebcli/core/base.py", line 19, in <module>
from ebcli import __version__
ImportError: cannot import name __version__
我基本上需要有s3和弹性beanstalk的命令行工具,但我显然没有运气,并将花费我整天搜索宇宙,并通过错误代码来尝试解决这个问题:(
我在Thinkpad上使用Ubuntu 14.04。
答案 0 :(得分:1)
不同的Python库相互安装很常见,导致这样的问题。
一个流行的解决方法是使用virtualenv工具创建隔离的Python环境。
awsebcli
的AWS文档有一个页面显示如何:Install the EB CLI in a Virtual Environment
或者,继续使用AWS Command-Line Interface (CLI),因为它适用于所有AWS服务,而不是使用特定于服务的命令集,如awsebcli
(在CLI之前)。