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