Why i can't imprt django.db?

enter image description here

I installed django on my virtualenv but still I can't import IT.

from the image, in the terminal it doesnt seem like you entered in the venv, you cannot import django because django it isnt installed in the python environment youre using. i think youre on windows and using powershell from visual code, to enter the venv do the following in the terminal:

1- cd venv

2- cd Scripts

3- activate

4- cd ..

5- cd ..

when you see the terminal path like this (venv) PS C:\first_project\first_app means you sucessfully entered the venv, if django is already installed you can run it.

Back to Top