Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to install and run Graphite on Ubuntu 12.10. To do it I followed this manual.

Unfortunately on the step:

Next, we will configure the Graphite database. Go to the Graphite webapp directory and run the database script:

cd /opt/graphite/webapp/graphite/

sudo python syncdb

I receive the following error:

Could not import graphite.local_settings, using defaults!
Could not import graphite.local_settings, using defaults!
Traceback (most recent call last):
  File "", line 11, in <module>
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 459, in execute_manager
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 382, in execute
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 196, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 231, in execute
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 266, in validate
    num_errors = get_validation_errors(s, app)
  File "/usr/lib/python2.7/dist-packages/django/core/management/", line 30, in get_validation_errors
    for (app_name, error) in get_app_errors().items():
  File "/usr/lib/python2.7/dist-packages/django/db/models/", line 158, in get_app_errors
  File "/usr/lib/python2.7/dist-packages/django/db/models/", line 67, in _populate
  File "/usr/lib/python2.7/dist-packages/django/db/models/", line 88, in load_app
    models = import_module('.models', app_name)
  File "/usr/lib/python2.7/dist-packages/django/utils/", line 35, in import_module
  File "/opt/graphite/webapp/graphite/events/", line 6, in <module>
    from tagging.managers import ModelTaggedItemManager
  File "/usr/local/lib/python2.7/dist-packages/django_tagging-0.3.2-py2.7.egg/tagging/", line 8, in <module>
    from .models import Tag, TaggedItem
  File "/usr/local/lib/python2.7/dist-packages/django_tagging-0.3.2-py2.7.egg/tagging/", line 7, in <module>
    from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name python_2_unicode_compatible

What can be the cause of the problem?

How can I fix it?

share|improve this question

Today, I faced exactly the same issue using the same manual as you did. I guess the problem is related to the fact that some python dependencies are installed for 2.7 and some are installed for 3.2. So I decided to install 2.7 only and skip all packages for 3.2.

$ sudo apt-get install apache2 apache2-mpm-worker \
    apache2-utils apache2.2-bin apache2.2-common libapr1 libaprutil1 \
    libaprutil1-dbd-sqlite3 build-essential \
    python-dev \
    libapache2-mod-wsgi libaprutil1-ldap memcached \
    python-cairo-dev python-ldap python-memcache \
    python-pysqlite2 sqlite3 erlang-os-mon erlang-snmp rabbitmq-server \
    bzr expect libapache2-mod-python python-setuptools

$ sudo easy_install django django-tagging zope.interface twisted txamqp

When I use these two commands instead of the commands in the manual, I do not get the error you mention any more:

ImportError: cannot import name python_2_unicode_compatible
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.