I'm very new to all of this, so bear with me.
I started, and activated, a virtual environment. But when I pip install anything, it installs to the computer, not the the virtual env.
I'm on a Mac, trying to build a Django website.
Example: With the virtual machine activated. I type:
python -m pip install Django
Then I can deactivate the virtual env, and type:
pip freeze
And it will list out the freshly installed version of Django.
Any clue as to why this is happening?
Run this line from your project folder where "env" is your virtual enviroment
# A virtualenv's python:
$ env/bin/python -m pip install django
If you want to install to your virtualenvironment you have to activate it, otherwise it will install to the main Python folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With