Well, I don’t know how many possible ways two copies of python can be different from each other. Obviously, they can differ in their major version numbers (ie, 2.4 versus 2.5), they can differ in their bit-sizes (32 bits versus 64 bits), and they can also differ in their unicode configurations (UCS2 versus UCS4), but who knows if that’s all.
Long story short, python libraries need to be compiled for a particular variant of python. Install a different variant, and Panda3D isn’t going to work.
Update: here’s what I added to the manual, under Linux Installation:
Python packages need to be compiled for a particular variant of python. For example, a package that works with python 2.4 will not work with python 2.5. A package that works with 32-bit python will not work with 64-bit python. A package that works with UCS2 python will not work with UCS4 python. And so forth. In short, a python package must be carefully aligned, feature-for-feature, with one particular python interpreter. That package will not work with any other python interpreter.
Fortunately for you, our prepackaged copies of Panda3D are already carefully matched. For example, our Panda3D for Ubuntu Gutsy Gibbon is already perfectly matched to the python interpreter that comes with Ubuntu Gutsy Gibbon. So normally, you don’t need to worry about this at all.
If your Linux Distribution is not listed, you will need to build your own copy of Panda3D. This is not very difficult, the Panda3D build process tends to work out-of-the box. But trying to use an RPM or a DEB from some other Distribution is very unlikely to work, because of this need for an exact feature-for-feature match between the python package and the python interpreter.
If you are using a copy of python other than the one that came with the Linux Distribution, you have a bigger problem. Panda3D’s build-scripts automatcially build Panda3D for the system’s native python interpreter, not for some other python interpreter. To get Panda3D to build for some other python interpreter, you will have to edit the build scripts.