linux python django环境配置?

#django-admin.py startproject mysite
Traceback (most recent call last):
File "/usr/bin/django-admin.py", line 2, in ?
from django.core import management
File "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 8, in ?
from django.core.management.base import BaseCommand, CommandError, handle_default_options
File "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 6
from __future__ import with_statement
SyntaxError: future feature with_statement is not defined
上面是配置django时出现的错误。

蝴蝶刀刀
浏览 597回答 1
1回答

繁星点点滴滴

python2.4 好老的python版本,试试python2.6或者python2.7安装django? 一般有两种方法安装python库:1,easy_installsudo easy_install django2,linux自带的软件包安装工具。ubuntu下:sudo apt-get install python-django
打开App,查看更多内容
随时随地看视频慕课网APP