Is there a difference between running script using virtualenv interpreter (without virtualenv activation) and running it in activated virtualenv?
venv/bin/python some_script.py
vs
source venv/bin/activate
python some_script.py
Running source bin/activate
will set the PATH variable to point to your environment bin
directory which is useful if you have other command line scripts/binaries installed (this can happen with certain python packages that add shell commands), it will also unset/set PYTHONHOME.
So, if bin/python
works for you then you're fine but if some of the packages you're using start behaving strangely (or wrong one gets imported) it's probably because Python is getting the wrong PYTHONHOME or because a certain script is not found in PATH.
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