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
Similar Posts:
- [Solved] Django cannot create an app after creating a project
- ImportError: Couldn’t import Django [How to Solve]
- ImportError: No module named pytz
- Django Run Error: RuntimeError: maximum recursion depth exceeded while calling a Python object
- How to Solve Error: [Errno 11001] getaddrinfo failed
- Linux Implement Django Error: nohup: ignoring input and appending output to ‘nohup.out’
- Django startup error: generator expression must be parentized
- ERRORS: ?: (staticfiles.E002) The STATICFILES_DIRS setting should not contain the STATIC_ROOT set…
- Error modulenotfounderror when starting Django: no module named ‘pytz’
- Python2.7 Error: command not found: django-admin.py [How to Solve]