Everytime I install django for my virtual environment I end up installing it globally. How to install django for virtual environment only?

Viewed 31

I am a beginner and trying to learn Django, for that I am working in virtual environment. Whenever I try to install Django in my virtual environment it is installed globally, which is I think I should avoid. Here is the picture of my command prompt.enter image description here

2 Answers

Try calling pip from your env folder in your command prompt and not global pip

pip install django

env\Scripts\pip.exe install django

Try with this --- First check your virtual environment is activate or not, if not use this command -

[virtual env folder name]/scripts/activate [Enter]

After Activating Virtualenv install Django: python -m pip install Django

check Django Version:--------- py -m django --version

Hope it will work for you.

Related