[Django]-How to use pip in virtualenv

7👍

You have to activate a your virtual environment first;
Check this for how to activate virtual env,
https://virtualenv.readthedocs.io/en/latest/user_guide.html

To install pip packages, you just need to call in terminal:

pip install package_name 

This will directly install the package to your virtual env.

3👍

Windows paths use backslashes, as shown in the prompt, not forwards ones.

env\Scripts\pip install django

although I don’t know why you should need to use the full path at all; just pip install django should work once the venv is activated.

Leave a comment