Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Django.conf module not found, why?

Tags:

module

django

I'm trying to install the Evennia Python MUD and when I get to the python manage.py syncdb command I get the below message... any ideas on why?

Traceback (most recent call last):
  File "evennia.py", line 33, in ?
    from django.conf import settings
ImportError: No module named django.conf
like image 867
Noah R Avatar asked Feb 05 '11 03:02

Noah R


People also ask

How to solve module not found error in django?

To solve the error, install the module by running the pip install Django command. Open your terminal in your project's root directory and install the Django module. Copied! After you install the Django package, you should be able to import it and use it.

What is conf in django?

django. conf settings are django default or "global" settings which you may override with your own project based settings.


1 Answers

An ImportError exception happens when Python cannot import a particular module. Usually it's because that module doesn't appear in your PYTHONPATH environment variable.

So, in your case, you need to add the path to django.conf to your PYTHONPATH.

Here's a great write-up on several different ways of accomplishing this:

http://docs.webfaction.com/software/python.html#importerror

Edited: corrected typo--django.conf should be added to the path, not evennia.py, thanks Yuji.

like image 54
Cloud Artisans Avatar answered Oct 11 '22 08:10

Cloud Artisans