我正在尝试遵循本教程: http : //docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html
以便在AWS中使用Ubuntu部署Ruby on Rails应用程序。
一切正常(我可以在本地运行我的应用程序),直到最后一步。 当我运行aws.push时,出现下一个错误。
roberto@ubuntu:~/dev/myapp$ git aws.push Traceback (most recent call last): File ".git/AWSDevTools/aws.elasticbeanstalk.push", line 21, in <module> from aws.dev_tools import * File "/home/roberto/dev/myapp/.git/AWSDevTools/aws/dev_tools.py", line 5, in <module> import boto ImportError: No module named boto
我读过这个postgit aws.push:没有名为boto的模块并运行:
pip install boto pip freeze > reqIuirements.txt git add . git commit -m "Added boto" git aws.push
但结果还是一样的。
更新:我认为这个问题是关系到我的Python版本。 当我运行which python
我得到/ usr / bin / python。 如果我做这个文件夹我看到python,python2,python2.7,python3,python3.4。
当我运行python
我得到:
Python 2.7.6 (default, Mar 22 2014, 22:59:56) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>>
我不知道该怎么办。
问题是第一个boto安装,由于权限问题,它不工作,我没有意识到。 我跑了sudo pip install boto
,这一切都OK了。
发生了什么事是在特定的AWS教程( http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html )中提供的eb命令行界面不提供最新版本的boto。
当你做到了
pip install boto
如果在OSX上没有安装pip:
sudo easy_install pip sudo pip install boto
确保在安装Python模块时查看输出以验证安装是否正确。 在Mac / Linux上,我必须运行sudo才能正确安装boto。
sudo pip install boto
我解决了同样的问题。 谢谢斯通先生
sudo easy_install pip sudo pip install boto
执行这3个步骤有助于防止安装pip / python时出现任何错误。
$ wget https://bootstrap.pypa.io/get-pip.py $ sudo python get-pip.py $ sudo pip install boto
或者,如果你在Mac上,那么你可以尝试安装Python3。
https://www.python.org/ftp/python/3.5.2/python-3.5.2-macosx10.6.pkg然后,安装它(用户界面的方式,如果你想)。
$ sudo pip3 install boto
在上面的帖子中看到我自己的评论。