It seems the internet doesn't have a clue on how to deploy Django on EC2, since Python2.6 is installed by default. I have found a way to also install Python2.7 together with 2.6, but I don't see a way to lunch Django from Python2.7. My django-admin.py is in /usr/bin/ and somehow, whenever I try to lunch a project, it refers to Python2.6.
互联网似乎没有关于如何在EC2上部署Django的线索,因为默认情况下安装了Python2.6。我找到了一种方法来安装Python2.7和2.6,但我没有看到从Python2.7午餐Django的方法。我的django-admin.py位于/ usr / bin /并且不知何故,每当我尝试午餐时,它都会引用Python2.6。
How do I install Django in Python2.7? Can I install Pip and then Django from the Python2.7 shell? If then I lunch django-admin.py does Django knows that I want to use Python2.7?
如何在Python2.7中安装Django?我可以从Python2.7 shell安装Pip然后安装Django吗?如果那时我午餐django-admin.py Django知道我想使用Python2.7吗?
I am a bit confused.
我有点困惑。
These are the errors I get with Python2.6 (Deploying Django On Amazon Ec2 Error), so I guess I now need to find a way to use Django with Python2.7.
这些是我用Python2.6(在Amazon Ec2 Error上部署Django)时遇到的错误,所以我想我现在需要找到一种方法来使用Django和Python2.7。
Every advice is appreciated, thanks in advance.
我们非常感谢您的建议。
1 个解决方案
#1
1
You are presumably using the "Amazon Linux" AMI, since the current version of that does supply Python 2.6 by default. According to the 2014.03 release notes, the next version - due this very month - will include Python 2.7. You might want to consider waiting for that to be released.
您可能正在使用“Amazon Linux”AMI,因为它的当前版本默认提供Python 2.6。根据2014.03发行说明,下一个版本 - 将于本月发布 - 将包含Python 2.7。您可能需要考虑等待释放。
Alternatively, if you don't know how to install the newer version of Python yourself, you should probably consider using a different distribution. Ubuntu, for example, supplies images for running on EC2, which will include the up-to-date version of Python. See here.
或者,如果您不知道如何自己安装较新版本的Python,则应考虑使用其他版本。例如,Ubuntu提供在EC2上运行的映像,其中包括最新版本的Python。看这里。
#1
1
You are presumably using the "Amazon Linux" AMI, since the current version of that does supply Python 2.6 by default. According to the 2014.03 release notes, the next version - due this very month - will include Python 2.7. You might want to consider waiting for that to be released.
您可能正在使用“Amazon Linux”AMI,因为它的当前版本默认提供Python 2.6。根据2014.03发行说明,下一个版本 - 将于本月发布 - 将包含Python 2.7。您可能需要考虑等待释放。
Alternatively, if you don't know how to install the newer version of Python yourself, you should probably consider using a different distribution. Ubuntu, for example, supplies images for running on EC2, which will include the up-to-date version of Python. See here.
或者,如果您不知道如何自己安装较新版本的Python,则应考虑使用其他版本。例如,Ubuntu提供在EC2上运行的映像,其中包括最新版本的Python。看这里。