AWS CLI $PATH Settings

后端 未结 14 2205
悲&欢浪女
悲&欢浪女 2021-01-30 04:50

I am following the AWS CLI Setup guide. I have managed to successfully install the tool on my Mac OS X terminal with the following output:

Running cmd: /usr/bin/         


        
相关标签:
14条回答
  • 2021-01-30 05:28

    This appears to be the Virtual Environment method at: https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-virtualenv.html

    without activating the virtualenv: source ~/cli-ve/bin/activate in the documented example.

    0 讨论(0)
  • 2021-01-30 05:29

    This happened to me as well and did not want to install brew anymore, because everything was running fine already. I also followed the 'tutorial' on AWS site and had problem in the export path step.

    Basically, it added a different python folder as the one, where awscli was downloaded. So instead of export PATH=~/.local/bin:$PATH what they suggested I used a full path from disk: export PATH=/Users/abc/Library/Python/3.6/bin/:$PATH

    0 讨论(0)
  • 2021-01-30 05:29

    If you have Anaconda version of python on your system, please use conda to install awscli:

    conda install -c conda-forge awscli
    
    0 讨论(0)
  • 2021-01-30 05:30

    I personally had the same issue with aws CodeBuild - I couldn't use the aws cli. I solved it by installing aws globally on my docker image (instead of installing it locally to a user).

    RUN pip install awscli --upgrade 
    
    (instead of RUN pip install awscli --upgrade --user)
    

    It worked for me, if that can help anyone !

    0 讨论(0)
  • 2021-01-30 05:31

    Take a look at the note on https://docs.aws.amazon.com/cli/latest/userguide/install-bundle.html

    By default, the install script runs under the system default version of Python. If you have installed an alternative version of Python and want to use that to install the AWS CLI, run the install script with that version by absolute path to the Python executable.

    For the step where you run the install executable

    instead of doing just:

    $ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

    Find out where your python is installed for example

    $ which python

    and then use the path to install the executable like

    $ sudo <path from executing which python> awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

    The above should fix the problem.

    0 讨论(0)
  • 2021-01-30 05:35

    when you run the command: pip3 install awscli --upgrade --user

    watch closely where the aws cli tool gets installed, you can see the path on terminal log, in my case I got something like this:

    awscli in ./Library/Python/3.6/lib/python/site-packages

    Now you should add to your .bash_profile the same path but on the bin folder(removing from the lib path and instead put your bin path) like this:

    export PATH=/Users/xuser/Library/Python/3.6/bin/:$PATH

    0 讨论(0)
提交回复
热议问题