Trying to Install AWS CLI, stuck on a step

我是研究僧i 提交于 2019-12-03 05:39:23

问题


Im trying to install aws for the mac command line, I guess I dont understand what I need to do I installed the aws bundle with wget on the terminal, unziped it did everything, but when I need to configure my credentials nothing comes up when I put aws configure..

Here are the Instructions: http://docs.aws.amazon.com/cli/latest/userguide/cli-chap-getting-set-up.html Here is what is ouputed

an$ aws configuration
Traceback (most recent call last):
  File "/usr/local/bin/aws", line 15, in <module>
    import awscli.clidriver
  File "/usr/local/aws/lib/python2.7/site-packages/awscli/clidriver.py", line 31, in <module>
    from awscli.help import ProviderHelpCommand
  File "/usr/local/aws/lib/python2.7/site-packages/awscli/help.py", line 20, in <module>
    from docutils.core import publish_string
  File "/usr/local/aws/lib/python2.7/site-packages/docutils/core.py", line 20, in <module>
    from docutils import frontend, io, utils, readers, writers
  File "/usr/local/aws/lib/python2.7/site-packages/docutils/frontend.py", line 41, in <module>
    import docutils.utils
  File "/usr/local/aws/lib/python2.7/site-packages/docutils/utils/__init__.py", line 20, in <module>
    import docutils.io
  File "/usr/local/aws/lib/python2.7/site-packages/docutils/io.py", line 18, in <module>
    from docutils.utils.error_reporting import locale_encoding, ErrorString, ErrorOutput
  File "/usr/local/aws/lib/python2.7/site-packages/docutils/utils/error_reporting.py", line 47, in <module>
    locale_encoding = locale.getlocale()[1] or locale.getdefaultlocale()[1]
  File "/usr/local/aws/lib/python2.7/locale.py", line 511, in getdefaultlocale
    return _parse_localename(localename)
  File "/usr/local/aws/lib/python2.7/locale.py", line 443, in _parse_localename
    raise ValueError, 'unknown locale: %s' % localename
ValueError: unknown locale: UTF-8

Any Ideas_?


回答1:


try adding below lines to ~/.bash_profile:

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8



回答2:


Installing AWSCLI in Windows Machine

I had similar issue with Windows 10 (64 bit). Python 3.5 and Python 2.7 are installed in my PC. I was getting ImportError: No module named awscli.clidriver.

Then I added %USERPROFILE%\AppData\Roaming\Python\Python35\Scripts in environment path variable and removed Python 2.7 from the environment path variable. Now I can successfully use awscli.

I have created a step by step AWSCLI installation guide in this Github repository: https://github.com/arsho/installation/tree/master/awscli_installation.




回答3:


In my case nothing worked, untill i gave more permissions, i run aws command with a non root user

chown amzadm.root  /usr/bin/aws
chown amzadm.root -R /usr/lib/python2.6/site-packages/
chown amzadm.root -R /usr/lib/python2.6/site-packages/awscli/



回答4:


I had to install EKS supported version and I ended up getting it to work with ignoring six:

$ pip3 install awscli --ignore-installed six



回答5:


I fixed this by adding a line to the 'aws' script just before the import (line 19). So now the file reads:

sys.path.append('/Users/<username>/.local/lib/aws/lib/python2.7/site-packages/')
import awscli.clidriver



回答6:


This work for me. In /.barshrc file

export AWS_DEFAULT_OUTPUT="json"


来源:https://stackoverflow.com/questions/22265659/trying-to-install-aws-cli-stuck-on-a-step

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!