Sometime there is a need to create a copy of exiting virtualenv to test extra features of our project.
In such a case we need to create a copy of the existing environment and add few more requirements.
One of the way to create a copy of existing virtualenv is mentioned below:
# while using existing virtualenv
(oldenv): pip freeze > requirements.txt
# after creating and logged-in to new virtualenv
(newenv): pip install -r requirements.txt
# where requirements.txt is the same file created using (oldenv)
But I personally do not prefer this way. Why?? Because of installing the same packages which are already there which we can re-use. Re-using or say copying will not only reduce the extra time and effort but will also reduce the Internet bandwidth usage to none, specially for limited and slow Internet users.
Cool! Then what are the other ways to create a copy of existing virtualenv locally?
I know two other ways which I'm mentioning below. Hope these will be helpful.