New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could not import settings 'graphite.settings' #1153

ghost opened this Issue Feb 12, 2015 · 2 comments


None yet
1 participant

ghost commented Feb 12, 2015

I have some problems when I try to install graphite.

I have set up carbon, whisper, ceres and graphite-web. And copy the to /opt/graphite/webapp/graphite from source package.

But when I excute 'python syncdb' showed error as below, I'm not sure what caused this. Please help to.

Traceback (most recent call last):
File "", line 11, in
File "/usr/lib/python2.6/site-packages/django/core/management/", line 443, in execute_from_command_line
File "/usr/lib/python2.6/site-packages/django/core/management/", line 382, in execute
File "/usr/lib/python2.6/site-packages/django/core/management/", line 261, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/usr/lib/python2.6/site-packages/django/core/management/", line 69, in load_command_class
module = import_module('' % (app_name, name))
File "/usr/lib/python2.6/site-packages/django/utils/", line 35, in import_module
File "/usr/lib/python2.6/site-packages/django/core/management/commands/", line 8, in
from import custom_sql_for_model, emit_post_sync_signal
File "/usr/lib/python2.6/site-packages/django/core/management/", line 6, in
from django.db import models
File "/usr/lib/python2.6/site-packages/django/db/", line 11, in
if DEFAULT_DB_ALIAS not in settings.DATABASES:
File "/usr/lib/python2.6/site-packages/django/utils/", line 184, in inner
File "/usr/lib/python2.6/site-packages/django/conf/", line 42, in _setup
self._wrapped = Settings(settings_module)
File "/usr/lib/python2.6/site-packages/django/conf/", line 95, in init
raise ImportError("Could not import settings '%s' (Is it on sys.path?): %s" % (self.SETTINGS_MODULE, e))
ImportError: Could not import settings 'graphite.settings' (Is it on sys.path?): No module named graphite.settings


This comment has been minimized.


brutasse commented Feb 12, 2015

You don't need Please try:

PYTHONPATH=/opt/graphite/webapp syncdb


This comment has been minimized.

ghost commented Feb 13, 2015

Thanks! It works fine when I try to execute as below:
PYTHONPATH=/opt/graphite/webapp /usr/lib/python2.6/site-packages/django/bin/ syncdb --settings=graphite.settings

@brutasse brutasse closed this Feb 13, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment