Django.conf module not found, why?

I try to install MUE Evenion Python and when I get the python manage.py syncdb command, I get the following 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
+5
source share
4 answers

An exception ImportErroroccurs when Python cannot import a specific module. This is usually because this module is not displayed in your environment variable PYTHONPATH.

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

Here is a great review of several different ways of doing this:

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

: ​​ - django.conf ​​ , evennia.py, Yuji.

+2

.pyc

find . -name "*.pyc" -exec rm -f {} \;

.

+1

You will get this if you just did not install Django.

eg.

pip install django
0
source

It is difficult to do the manual work of changing the path and may create some other problems, so instead go to your environment and delete the bin and pip-selfchek.json folders, now re-create your env environment in any way that you want to use. i generally use

virtualenv -p python3 <envname>

Now activate ENV and check all your packages for

pip freeze

all is well to go.

0
source

All Articles