尝试运行AWS CLI时出现以下错误。我已经尝试过安装六个,但它仍然没有用。
有人可以告诉我什么是错的吗?
我之前从未设法在此计算机上运行AWS CLI。
Traceback (most recent call last):
File "/usr/local/bin/aws", line 23, in <module>
sys.exit(main())
File "/usr/local/bin/aws", line 19, in main
return awscli.clidriver.main()
File "/usr/local/lib/python3.3/site-packages/awscli/clidriver.py", line 49, in main
driver = create_clidriver()
File "/usr/local/lib/python3.3/site-packages/awscli/clidriver.py", line 58, in create_clidriver
event_hooks=emitter)
File "/usr/local/lib/python3.3/site-packages/awscli/plugin.py", line 44, in load_plugins
modules = _import_plugins(plugin_mapping)
File "/usr/local/lib/python3.3/site-packages/awscli/plugin.py", line 61, in _import_plugins
module = __import__(path, fromlist=[module])
File "/usr/local/lib/python3.3/site-packages/awscli/handlers.py", line 61, in <module>
from awscli.customizations.opsworks import initialize as opsworks_init
File "/usr/local/lib/python3.3/site-packages/awscli/customizations/opsworks.py", line 24, in <module>
from six.moves import shlex_quote
ImportError: cannot import name shlex_quote
答案 0 :(得分:20)
AWSCLI 1.6.7已损坏。 (我在Ubuntu 14.04.1 LTS上)
sudo pip install awscli==1.6.6
答案 1 :(得分:11)
1.6.7的发布存在六个包所需的最低版本的问题。此问题已得到解决,通过pip install --upgrade awscli
升级到1.6.8将解决此问题。
答案 2 :(得分:5)
尝试通过pip uninstall / pip install重新安装六个。它对我有用。
答案 3 :(得分:4)
您需要六个版本&gt; 1.8.0。
$ pip install six==1.8.0
答案 4 :(得分:1)
尝试将以下行添加到〜/ .bash_profile:
导出LC_ALL = en_US.UTF-8
export LANG = en_US.UTF-8
对于MAC用户
答案 5 :(得分:0)
我不得不更新Python
在FreeBSD上,我跑了。
pkg update
pkg upgrade
然后我就能运行AWS了
aws --version
aws-cli / 1.11.74 Python / 2.7.13 FreeBSD / 11.0-CURRENT botocore / 1.5.37
答案 6 :(得分:0)
我必须从我的.bashrc中的$ PATH中删除anaconda bin。
/home/<user>/anaconda2/bin/
然后当它从/ usr / bin开始接收时就可以了。
答案 7 :(得分:0)
从捆绑包重新安装aws-cli对我有用:
$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws
$
$ aws --version
aws-cli/1.16.299 Python/2.7.15+ Linux/4.15.0-1056-aws botocore/1.13.35