0
我已经安装了django谷歌分析使用:与此响应:Requirement already satisfied: django-google-analytics in ./env/lib/python2.7/site-packages
。Django的谷歌分析导入错误
我已经添加到'google_analytics',
和INSTALLED_APPS
我已经添加在settings.py
GOOGLE_ANALYTICS_MODEL = True
当我运行env/bin/python manage.py syncdb
我得到ImportError: No module named google_analytics
什么我需要做什么?
编辑
下面是完整的回溯,如果有帮助
cache cleared
cache settings imported
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/henry/Documents/culture.folder/src/culturegymnkitchen/env/local/lib/python2.7/site-packages/django/apps/config.py", line 90, in create
module = import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named google_analytics
什么是您的Django版本? –
从requirements.txt安装为Django == 1.7.10 – HenryM
但这就是答案 - 我的版本是错误的。我已经重新安装了一切,似乎已经取得了进展。 – HenryM