WholesomeGhost
WholesomeGhost

Reputation: 1121

Django not working on windows 10

I am trying to run django on windows 10. I installed virtual environment using:

python -m pip install virtualenvwrapper-win

then I entered the virtual environment:

mkvirtualenv project

Then I installed django using pip:

python -m pip install django

Everything went fine and i got a message that django was installed succesfully. After that I ran:

django-admin startproject mysite
cd mysite

Up to this point everything was going fine but then when I tried to start it using:

python manage.py runserver

I got an error saying:

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?  

Does anyone have experience with this error and if yes does anyone know how to fix it?

Upvotes: 1

Views: 1396

Answers (1)

WholesomeGhost
WholesomeGhost

Reputation: 1121

I managed to fixed it by entering the virtual environment using:

mkvirtualenv project

and then installing django with

pip install django 

instead of

python -m pip install django

Upvotes: 1

Related Questions