How to have two versions of Panda3D installed?

They install to the same locations. It may be possible to get it to work, but switching back and forth will be troublesome - you’d probably have to install to two separate locations and set up scripts that will switch around your PYTHONPATH and PATH settings.

However, in Ubuntu, it’s quick enough to install and uninstall a package, so it’s probably not worth the trouble.