0

I'm trying to setup an instance of FeinCMS to check it out. I've added the all the modules under INSTALLED APPS but when I run the command python manage.py syncdb I get the error Import Error: No module named mptt. What am I doing wrong?

My settings.py:

INSTALLED_APPS = (
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.sites',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'django.contrib.admin',
    'feincms', 
    'mptt', 
    'feincms.module.page',
    'feincms.module.medialibrary'  
)
Paolo
  • 20,112
  • 21
  • 72
  • 113
thedeepfield
  • 6,138
  • 25
  • 72
  • 107

1 Answers1

1

Did you install the package?

> pip install django-mptt

I assume you're using a virtualenv?

Is your project running within the same Python env as the interpreter? If it is, a quick check would be:

> pip install yolk
> yolk -l  # see if the mptt package is available, if not:
> pip install django-mptt  # optionally use the --update flag

Still issues? Remove any *.pyc files and restart your server to make sure there's no import issues from previously removed files.

> find . -type f -name "*.pyc" | xargs rm
> ./manage.py runserver 8000

No good? Add a statement to your manage.py file right after your import statements:

# ...
import sys
print sys.path

Re-run the server to see if the mptt is missing from your path, if it is, check your site-packages folder and check the package's path.

Hedde van der Heide
  • 21,841
  • 13
  • 71
  • 100