#django-admin.py startproject mysiteTraceback (most recent call last):File "/usr/bin/django-admin.py", line 2, in ?from django.core import managementFile "/usr/lib/python2.4/site-packages/django/core/management/__init__.py", line 8, in ?from django.core.management.base import BaseCommand, CommandError, handle_default_optionsFile "/usr/lib/python2.4/site-packages/django/core/management/base.py", line 6from __future__ import with_statementSyntaxError: future feature with_statement is not defined上面是配置django時出現(xiàn)的錯誤。
1 回答

繁星點點滴滴
TA貢獻1803條經(jīng)驗 獲得超3個贊
python2.4 好老的python版本,試試python2.6或者python2.7安裝django? 一般有兩種方法安裝python庫:
1,easy_install
sudo easy_install django
2,linux自帶的軟件包安裝工具。ubuntu下:
sudo apt-get install python-django
- 1 回答
- 0 關注
- 633 瀏覽
添加回答
舉報
0/150
提交
取消