I have installed Django after activating my virtualenv but still I am getting following error
from django.core.management import execute_from_command_line
ImportError: No module named django.core.management
You should check if django is installed Activate your environment, then run the following command to see which version is installed :
python -c "import django; print(django.get_version())"
If you already activated your virtualenv (source /path/bin/activate
) then check if you have installed Django.
pip install django
With next command you can see if Django was installed.
pip freeze | grep django
Another thing that you can try is to remove first line (#!/usr/bin/env python
) in the manage.py
file.
I am using virtual environment so I added this line in manage.py
:
sys.path.append('./myvenv/lib/python3.5/site-packages')
in which myvenv
is the name of my virtual environment and version of my installed Python is 3.5
.
This solved my issued.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With