I decided to run old code samples on Panda3d 1.8. 0 and when start the Python interpreter 2.7.2, I start ShowBase from the Panda3d folder version 1.10.3. How can this be?
Are you on Windows? If so, Panda writes its location to the Windows Registry, and therefore it is available to any Python installation of the given version.
What does your
sys.path look like?
[‘D:\Panda3DCode\Code1\Code\X’, ‘D:\Panda3DCode\Panda3D-1.8.0\python\python27.zip’, ‘C:\Panda3D-1.10.3-x64’, ‘D:\Panda3DCode\Panda3D-1.8.0\python\DLLs’, ‘D:\Panda3DCode\Panda3D-1.8.0\python\lib’, ‘D:\Panda3DCode\Panda3D-1.8.0\pyth
on\lib\plat-win’, ‘D:\Panda3DCode\Panda3D-1.8.0\python\lib\lib-tk’, ‘D:\Panda3DCode\Panda3D-1.8.0\python’, ‘D:\Panda3DCode\Panda3D-1.8.0’, ‘D:\Panda3DCode\Panda3D-1.8.0\bin’, ‘D:\Panda3DCode\Panda3D-1.8.0\python\lib\site-packages’
And if you type
import panda3d.core and then
print(panda3d.core.__file__) (and the same for the
I do note that in the “sys.path” shown above, a Panda 1.10.3 installation seems to appear before any of the other Panda installations. (Starting at the end of the first line; while there is a Panda-directory before it, that appears to point specifically to that version’s Python installation.)
Ah, not sure how I missed that, thanks. Hmm, I recognise that the new behaviour can be inconvenient when wanting to switch between different Panda versions without having to edit the Windows registry or uninstalling the other Panda build. I would generally recommend using pip and virtualenv to install Panda if you want to be able to easily and reliably switch between different Panda versions, though I realise we don’t have a way to install Panda3D 1.8.0 into a virtualenv.
A quick and dirty workaround is just to rename the “Panda3D-1.10.3-x64” folder to something else for the moment.