社区所有版块导航
Python
python开源   Django   Python   DjangoApp   pycharm  
DATA
docker   Elasticsearch  
aigc
aigc   chatgpt  
WEB开发
linux   MongoDB   Redis   DATABASE   NGINX   其他Web框架   web工具   zookeeper   tornado   NoSql   Bootstrap   js   peewee   Git   bottle   IE   MQ   Jquery  
机器学习
机器学习算法  
Python88.com
反馈   公告   社区推广  
产品
短视频  
印度
印度  
Py学习  »  Django

大神来看下问题.

fanglq04 • 10 年前 • 6985 次点击  

linux的环境 参考这个文章搭建的环境 不过没有用它的wget方式 我用的yum 或者 easy_install

python 是2.6.6

django 用的是easy_install 安装 是1.7 最新的

现在用django_admin.py 创建项目

报错

为何??

如下

[root@AY1312291050176115caZ ~]# whereis diango-admin.py
diango-admin:

[root@AY1312291050176115caZ ~]# django-admin.py
Traceback (most recent call last): File "/usr/bin/django-admin.py", line 4, in <module> import('pkg_resources').run_script('Django==1.7', 'django-admin.py') File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 517, in run_script

File "build/bdist.linux-x86_64/egg/pkg_resources.py", line 1423, in run_script ind[parent] = [parts.pop()] File "/usr/lib/python2.6/site-packages/Django-1.7-py2.6.egg/EGG-INFO/scripts/django-admin.py", line 2, in <module> from django.core import management File "/usr/lib/python2.6/site-packages/Django-1.7-py2.6.egg/django/core/management/init.py", line 68 commands = {name: 'django.core' for name in find_commands(path[0])} ^ SyntaxError: invalid syntax

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/676
 
6985 次点击  
文章 [ 1 ]  |  最新文章 10 年前
kinegratii
Reply   •   1 楼
kinegratii    10 年前

Python compatibility Django 1.7 requires Python 2.7 or above, though we highly recommend the latest minor release. Support for Python 2.6 has been dropped and support for Python 3.4 has been added.