why virtual env is used instead of global env
Why we need the use the virtual environment
virtualenv is a necessary for creating seperate python environments projects containing their own copy of python and there you can install the libraries specific to them
suppose you created a project with django 3.0 without using virtualenv and after some time django is get updated now you have django 4.0 and you created one project with django 4.0 by updating the django from 3.0 to 4.0. So now it is possible that if you try to run your project that was made with django 3.0 might raise some conflicts due to the diff version.
So it is advised to create separate environments for separate projects in order to avoid conflicts.
I hope you will understand this. In case of any query pls msg me back. I will surely help you out.
Happy Coding
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.