In this article, I will walk you through everything about Virtual Environment in Python that you should know like from “what is virtual environment?” to “how it is used?”.
By the word Virtual Environment you would have got that its basically same as an environment. Yes, Indeed it is but here its an environment inside a main environment. In IT industry everything which we build, We will start it by creating an virtual environment for it as first step. Why? because if you are going to build a project you take many packages/libraries to build one solo project.
Now let’s take an example(from my own experience), I’m building a project where I used tensorflow 2.2 to do that and project got executed successfully and later I got to another project again with same framework but this time I should use tensorflow 1.4 due to other libraries compatibility. Now My project would never gets executed because my machine got 2.2 version, where I need 1.4. So, the only way I can make it happen is uninstall 2.2 version and install 1.4 version but here’s a twist tensorflow library is 350+ mb in size. Now you know the pain of uninstalling and reinstalling it and also time its take. Also don’t forget now that I have installed 1.4 version the precious project will not run because compatibility issue with other libraries in that project.

#python #virtualenv #virtual-environment #virtualenvwrapper

“Python Virtual Environment ” in Nutshell.
2.20 GEEK