Search code examples
pythonvirtualenvvirtualenvwrapper

Why we need to install virtualenv and virtualenvwrapper


I am new to django and I have heard of virualenv and virtualenvwrapper but don't understand why they are required. I am also confused that when we install any package how how it maps to the environment. Please also tell me where to put our project apps, can we put it anywhere irrespective of virtualenv folder. Thanks in advance.


Solution

  • Going through the comments and answers I came to conclution that- At first we have to install virtual environment to isolate my project settings from system's settings. Here settings refer to Various packages with different versions. This isolation helps to prevent any conflict between systems setting and projects settings. Also there can be multiple projects.


    Now secondly we need to install virtualenvwrapper because there may be many virtualenvs in my PC ie. one with python3 other with python2 as required in different projects, So we need a wrapper where we can put all our envs and manage them.(Installing virtualenvwrapper is optional, virtualenv will provide all the necessary commands to us).


    At last as you have virtualenv installed you can now activate the virtualenv and then install Django, pip will automatically link Django with activated env. You can put your project in any directory.