It is a common case among Odoo developers to maintain code for several Odoo versions. Some organizational effort is needed to keep these projects alongside each other and working on the same development machine. And, there is some context switching needed when changing from one version to another. For example, the Odoo start executable is now odoo-bin, but in older versions it was odoo.py, and you need to remember that. With the move to Python 3, this can be even more confusing; you need to choose whether to use python / pip or python3 / pip3, depending on the Odoo server version you are working on at that moment.
Python includes virtualenv, a tool to manage independent Python environments on the same machine. Each environment has its own Python executable and installed libraries. You just need to activate the environment...