Tag Archives: Django exception

Django exception-ImportError: No module named django.core.management

Django error-ImportError: No module named django.core.managementProblem
description:
Enter manage.py runserver on the command line, it prompts that the django.core.management module cannot be found.

Problem analysis:
1. Make sure that Django has been installed, and check the Django installation directory. django.core.management does exist
. 2. There are two versions of Python on the computer. Check that the Python version set by the environment variable has Django installed
. 3. Followed by Command line input:
python
import django
django.VERSION
prints out Django version V1.3.1

4. Continue to point 3, type in the command line:
from django.core.management import execute_manager
command input is normal! ! ! This is weird. .

5. You can determine the function of normal Django, Python If you have heard that there may be multiple versions installed version compatibility issues, try to manually specify the version of Python to run Django project, at the command line:
Python25 manage.py the runserver
problem is solved

Solution :
specified before the command manage.py runserver to use Python version, at the command line:
Python25 manage.py runserver

Summary:
When there are multiple versions of Python installed on the computer, sometimes even if the version to be run is correctly set in the environment variable, there may still be errors. At this time, you can try to specify the Python to be used on the command line, such as python25 manage.py runserver