我正试图遵循本教程: http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html
为了在带有Ubuntu的AWS中部署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
我已经阅读了这篇文章git aws.push: No module named 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
,这次一切都很顺利。
确保在安装Python模块时查看输出以验证安装是否正确。在Mac/Linux上,我必须运行sudo才能让boto正确安装。
如果在没有安装pip的OSX上:
实际情况是,特定AWS教程(http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html)中提供的eb命令行界面没有提供boto的最新版本。
当你这么做的时候
您安装了https://github.com/boto/boto中的最新版本,解决了问题。
相关问题 更多 >
编程相关推荐