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