[Django]-Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH

3👍

This most likely means that you’re not running the command from within the activated virtualenv:

C:\> my_venv\Scripts\activate

(my_venv) C:\>  (type your command now)

The error message you’re getting is produced if unable to import django.core.management:

try:
    from django.core.management import execute_from_command_line
except ImportError as exc:
    raise ImportError(
        "Couldn't import Django. Are you sure it's installed and "
        "available on your PYTHONPATH environment variable? Did you "
        "forget to activate a virtual environment?"
    ) from exc

You can get into the Python console with the same environment as the faulty command (e.g. in your case, type python in the same console window) and try to import that module by hand, then diagnose the resulting import error.

Leave a comment