我刚刚从here下载了Pina-Project-Account。
我尝试python manage.py runserver
,它开始告诉我No module named...
;我用pip install ...
解决了其中一些问题。
然后它问我事件日志(ImportError: No module named eventlog
)。我试过pip install eventlog
,这就是我得到的:
Collecting eventlog
Downloading eventlog-0.11.0.tar.gz
Collecting django-jsonfield>=0.8.11 (from eventlog)
Downloading django-jsonfield-0.9.15.tar.gz
Installing collected packages: django-jsonfield, eventlog
Running setup.py install for django-jsonfield
Running setup.py install for eventlog
Successfully installed django-jsonfield-0.9.15 eventlog-0.11.0
所以从这里我觉得它进展顺利,但我仍然得到同样的错误。这是整个追溯:
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/Library/Python/2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/Library/Python/2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Library/Python/2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Library/Python/2.7/site-packages/django/apps/config.py", line 119, in create
import_module(entry)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named eventlog
是错误的事件日志,还是我需要进一步配置事件日志以使其对django可见?
感谢您的帮助。
答案 0 :(得分:2)
您必须在eventlog
中的INSTALLED_APPS
中添加settings.py
。
它应该是这样的:
INSTALLED_APPS = (
...
'eventlog',
...
)