python - django 1.8 在 CentOs 6.5 服务器上不工作

标签 python django centos6.5

Installing collected packages: Django
Successfully installed Django-1.8
[root@manage ~]# PYTHON
-bash: PYTHON: command not found
[root@manage ~]# python
Python 2.6.6 (r266:84292, Jan 22 2014, 09:42:36)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-4)] on linux2 
Type "help", "copyright", "credits" or "license" for more information.
>>> import django
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python2.6/site-packages/django/__init__.py", line 1, in <module>
from django.utils.version import get_version
File "/usr/lib/python2.6/site-packages/django/utils/version.py", line 7, in <module>
from django.utils.lru_cache import lru_cache
File "/usr/lib/python2.6/site-packages/django/utils/lru_cache.py", line 28
fasttypes = {int, str, frozenset, type(None)},
                ^
SyntaxError: invalid syntax
>>>

你好,我是 Django 和 CentOS 的新手,我刚刚通过 pip 成功安装了 django 1.8,但是当我尝试在 python shell 中导入 django 时,它显示了上面的错误消息,谁能告诉我发生了什么??谢谢!

最佳答案

Django 1.8 requires Python 2.7, 3.2, 3.3, 3.4, or 3.5.

https://docs.djangoproject.com/fr/1.9/releases/1.8/#python-compatibility

关于python - django 1.8 在 CentOs 6.5 服务器上不工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34271160/

相关文章:

python - Django - 表 xxx 没有名为 xxx 的列

mysql - MySQL是否写入TMP分区

python - 如何将 Python 服务器端与共享主机一起使用?

python - 检查可迭代列表中的 NoneTypes

Python继承,将方法移动到公共(public)类

php - make 尝试在 Centos 6 上安装 mongo php 驱动程序失败

python - 难以在同一绘图上绘制函数、其一阶导数及其不定积分

python - 如何允许我的不和谐机器人流式传输音频? (未找到 FFMPEG)

python - 哪个是作为参数的 token 的 django url 正则表达式?