我正在尝试遵循本教程:http://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create_deploy_Ruby_rails.html 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:没有名为 boto 的模块 https://stackoverflow.com/questions/23297719/git-aws-push-no-module-named-boto并运行:
pip install boto
pip freeze > reqIuirements.txt
git add .
git commit -m "Added boto"
git aws.push
但结果还是一样。
UPDATE:我认为这个问题与我的 python 版本有关。
当我跑步时which python
我得到/usr/bin/python。如果我执行 ls 这个文件夹,我会看到 python、python2、python2.7、python3、python3.4。
当我跑步时python
I get:
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
这次一切都很顺利。