Suppose you need to work on three different projects project A, project B and project C. project A and project B need python 3 and some required libraries. But for project C you need python 2.7 and dependent libraries.
So best practice for this is to separate those project environments. To create virtual environment you can use below technique:
Virtualenv, Virtualenvwrapper and Conda
Although we hav several options for virtual environment but virtualenvwrapper is most recommended.