Error: No module named staticfiles

泪湿孤枕 提交于 2020-01-29 05:50:05

问题


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!


回答1:


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




回答2:


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

sudo easy_install --upgrade django



回答3:


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!




回答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.




回答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.



来源:https://stackoverflow.com/questions/4987333/error-no-module-named-staticfiles

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!