dee*_*cox 12 python command-line-interface amazon-web-services amazon-elastic-beanstalk
我在尝试在Mac OSX上运行ElasticBeanstalk CLI工具时遇到错误.我一直在解决路径问题,希望有人可以解决问题.这是我的设置.
我正在运行Mac OS X El Capital 10.11.6,我手动安装了Python 3.4(通过python.org上的下载安装程序).我可以看到它已正确安装/Library/Frameworks/Python.frameworks/Versions.python3按预期开始的命令.我还通过运行安装了AWS ElasticBeanstalk CLI工具,sudo pip3 install --upgrade awsebcli并确认它位于/Users/myuser/Library/Python/3.4/lib/python/site-packages/目录中.
我已经尝试修改我的~/.bash_profile,以及删除它.当我跑步时echo $PATH,这是我的输出:
/Users/myuser/Library/Python/3.4/lib/python/site-packages/ebcli/:
/Library/Frameworks/Python.framework/Versions/3.4/lib/python/site-packages:
/Library/Frameworks/Python.framework/Versions/3.4/bin:
/Users/myuser/.rvm/gems/ruby-2.2.4/bin:
/Users/myuser/.rvm/gems/ruby-2.2.4@global/bin:
/Users/myuser/.rvm/rubies/ruby-2.2.4/bin:
/usr/local/bin:
/usr/bin:
/bin:
/usr/sbin:
/sbin:
/opt/X11/bin:
/usr/local/git/bin:
/Users/myuser/.rvm/bin
Run Code Online (Sandbox Code Playgroud)
这是我的 ~/.bash_profile
# Load the default .profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile"
# Load RVM into a shell session *as a function*
#[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
# Setting PATH for Python 3.4 site packages
PATH="/Library/Frameworks/Python.framework/Versions/3.4/lib/python/site-packages:${PATH}"
PATH="/Users/myuser/Library/Python/3.4/lib/python/site-packages/ebcli/:${PATH}"
export PATH
Run Code Online (Sandbox Code Playgroud)
dee*_*cox 26
经过更多的试验和错误,我终于得到了这个工作.这是我采取的步骤.
~/.bash_profile.将以下内容添加到我的~/.bash_profile.
Run Code Online (Sandbox Code Playgroud)# Setting the path for Python 3.4 PATH="/Library/Frameworks/Python.framework/Versions/3.4:${PATH}" export PATH
打开一个新的终端窗口.(也可以运行source ~/.bash_profile).
跑了eb --version并得到以下输出:
EB CLI 3.9.0 (Python 3.4.4)
Run Code Online (Sandbox Code Playgroud)我发现发布一个自己的答案是不太酷的,但希望我的试验和错误对于其他有混乱路径的人有帮助.
小智 15
这是在Mac上为我做的:
brew install awsebcli
Run Code Online (Sandbox Code Playgroud)
来自:https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/eb-cli3-install-osx.html
我遇到了同样的问题。只需升级 awsebcli 就可以帮助:pip install --upgrade awsebcli
| 归档时间: |
|
| 查看次数: |
9512 次 |
| 最近记录: |