Python Local Enviornment setup on Ubutnu

I have never coded in my life so its time to learn and do sumthing !!
In my previous Job where i was supposed to code in Python and i was not quick enough to do that, i came to know about this Virtualenv funda.

We need a virtual environment so that we can install certain Python software which we need for specific application, like Python Django framework which has its on deps and which might break other current apps which uses older version of it.

sudo apt-get install python-virtualenv

Suppose you want to create a directory name “pywrk” and this to work on your python virtual environment simply map this directory to virtualenv

$pwd
/home/atul/pywrk
$which python
/usr/bin/python

Lets setup virtualenv now for this directory
$ virtualenv ~atul/pythonwrk/
$ source ~atul/pythonwrk/bin/activate

So we have our own python local environment setup. We can install modify add all packages inside this directory and it will be served for our local environment.