Home > Enterprise >  Everytime I install django for my virtual environment I end up installing it globally. How to instal
Everytime I install django for my virtual environment I end up installing it globally. How to instal

Time:09-23

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

CodePudding user response:

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

pip install django

env\Scripts\pip.exe install django

CodePudding user response:

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