8
I saw that the VirtualEnv
provides a way to create different environments for application development in Python
. And, whenever we use, it is necessary to install the dependencies of a specific project.
For example, I realize that when it comes to projects like Django
and related, there is a strong recommendation to use this virtual environment.
However, as I am used to programming in PHP
and I never had problems using the same version of PHP for my projects, I started to wonder if it really is necessary or if the whole situation would be necessary.
Because, apparently, a version of Python
is installed, along with Pip
and Easy install
, for each Virtual Env
created. Already in PHP, we can for example only use the necessary dependencies in a project, through the Composer
, and use the PHP
that is already installed to develop, in this case just stick to the details of the version used.
So I’d like anyone with experience greater than mine Python
explain to me:
What are the positives of using Virtualenv?
Is there a case where I shouldn’t worry about using Virtualenv?
It is essential that in all types of projects i use
VirtualEnv
, or only conflicting cases?Wouldn’t it be better to install everything globally instead of using
VirtualEnv
? Because whether you want it or not, it’s a further step in development.
good answer, thanks +1. In my case then, I have to use Virtualenv. The projects are in PHP, but if I ever migrate to Python, it’s 10 systems that I work on at the same time
– Wallace Maxters
In fact, if PHP doesn’t have a similar device, it only brings disadvantages - the amount of disk space that Virtualenvs use is negligible relative to the size of modern Hds - that would be the only disadvantage. Even so, it is still possible to install some packages on the system, and others distinct in each virtualenv, in some cases - just create virtualenv with the option
--with-sytem-packages
and packages like "ipython" or "ipdb" that are not really part of the projects can be shared.– jsbueno