Error: No module named staticfiles

18,387

Solution 1

I just remove the whole server and installed everything again, that solved everything. Seems I got some old django ghost installation or something

Sorry and thanks!

Solution 2

You're probably using older version of Django. staticfiles app has been available from version 1.3 only.

Solution 3

You most likely need to upgrade your version of django by using setuptools

sudo easy_install --upgrade django

Solution 4

FYI - I just ran into this error. The default Django for the system is 1.2.1 and I am using Django 1.3 in a virtualenv. I was getting the error because I had forgotten to activate my virtualenv so it was trying to use the system Django.

Solution 5

Another way this error could occur; is that you call ./manage.py even if your in the correct virtualenv. For some reason it uses the system python as supposed to the virtualenv one.

The correct syntax is:

python manage.py <command>

I hope this saves someone some time.

Share:
18,387
Mc-
Author by

Mc-

Creative &amp; Programmer &amp; Draftsman, 
I spent most of the time struggling to differentiate what's reality or what's my imagination Founder @BcnDevCon @_faisme_

Updated on July 28, 2022

Comments

  • Mc-
    Mc- almost 2 years

    I'm newbie with django, I'm trying to deploy my project on a production server but I'm getting this error:

    Error: No module named staticfiles
    

    When trying to start the server:

    python manage.py runfcgi host=127.0.0.1 port=8081 --settings=settings
    

    with the fastCGI + nginx

    Any idea?

    Thanks!

  • Mc-
    Mc- about 13 years
    I have just downloaded the last version from the trunk. I'll check that anyway
  • Mc-
    Mc- about 13 years
    Type "help", "copyright", "credits" or "license" for more information. >>> import django >>> django.VERSION (1, 3, 0, 'alpha', 0)
  • Oldskool
    Oldskool almost 12 years
    Thanks for this answer, you just saved me a major headache digging into this issue.