You should always create a virtual environment. It's easy to interact with, and it allows you to avoid conflicts between projects. Save this answer.
Virtual Environment should be used whenever you work on any Python based project. It is generally good to have one new virtual environment for every Python based project you work on. So the dependencies of every project are isolated from the system and each other.
One of your projects might require a different version of an external library than another one. If you have only one place to install packages, then you can't work with two different versions of the same library. This is one of the most common reasons for the recommendation to use a Python virtual environment.
While the tools allow you to put your virtual environments anywhere in the system, it is not a desirable thing to do. There are two options: Have one global place for them, like ~/virtualenvs . Store them in each project's directory, like ~/git/foobar/.
After googling around regarding virtualenv, I was under the impression that virtual environments should be created for every project I create (that are related and use the same site packages).
Is this true and why or why not?
Also, if I am currently using a virtualenv for one of my projects, how would I go about upgrading when upgrades for the packages come along?
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