AWS CLI无法在Mac OSX Yosemite上运行

Tim*_*ahn 4 amazon pip command-line-interface amazon-web-services python-2.7

我已成功使用PIP将AWS CLI下载到Mac OSX Yosemite上.我正在运行Python 2.7版.

我可以看到AWS可执行文件/Library/Frameworks/Python.framework/Versions/2.7/bin.

但是当我试着奔跑的时候

aws help

在我的终端中测试AWS CLI的工作原理,我明白了

-bash: aws: command not found

谁知道为什么这不起作用?

cee*_*yoz 13

/Library/Frameworks/Python.framework/Versions/2.7/bin将需要在你的道路上.在您的~/.profile文件中(如有必要,创建一个)添加如下行:

export PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:$PATH"
Run Code Online (Sandbox Code Playgroud)

打开一个新的终端窗口,它应该工作.

  • 因为我为我的用户安装了'aws` cli工具,所以我不得不这样做:`export PATH ="$ HOME/Library/Python/2.7/bin:$ PATH"`而不是.我是在MacOS Sierra上做到的. (7认同)