我正在尝试安装Evennia Python MUD,当我到达python manage.py syncdb命令时,我得到以下消息...有关为什么的任何想法?
Traceback (most recent call last):
File "evennia.py", line 33, in ?
from django.conf import settings
ImportError: No module named django.conf
Run Code Online (Sandbox Code Playgroud)
ImportError当 Python 无法导入特定模块时会发生异常。通常是因为该模块没有出现在您的PYTHONPATH环境变量中。
因此,就您的情况而言,您需要将路径添加django.conf到您的PYTHONPATH.
以下是关于实现此目的的几种不同方法的精彩文章:
http://docs.webfaction.com/software/python.html#importerror
编辑:更正了拼写错误——django.conf应该添加到路径中,而不是evennia.py,谢谢 Yuji。