ImportError:没有名为django.core.management的模块

时间:2013-05-24 10:05:44

标签: django

我尝试了“python manage.py runserver”并得到了上述错误。进入python解释器,我运行命令“来自django.core.management import execute_from_command_line“并得到以下回溯:

>>> from django.core.management import execute_from_command_line
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/andy/.virtualenvs/olp/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 4, in <module>
    from optparse import OptionParser, NO_DEFAULT
  File "/usr/lib/python2.7/optparse.py", line 77, in <module>
    import textwrap
  File "/usr/lib/python2.7/textwrap.py", line 10, in <module>
    import string, re
  File "/usr/lib/python2.7/string.py", line 83, in <module>
    import re as _re
  File "/home/andy/.virtualenvs/olp/lib/python2.7/re.py", line 105, in <module>
    import sre_compile
  File "/home/andy/.virtualenvs/olp/lib/python2.7/sre_compile.py", line 14, in <module>
    import sre_parse
  File "/home/andy/.virtualenvs/olp/lib/python2.7/sre_parse.py", line 17, in <module>
    from sre_constants import *
  File "/home/andy/.virtualenvs/olp/lib/python2.7/sre_constants.py", line 18, in <module>
    from _sre import MAXREPEAT
ImportError: cannot import name MAXREPEAT

有谁知道这是怎么回事?

0 个答案:

没有答案