libpng problem on OS X 10.5.2

The error: “Incompatible library version: libpanda.dylib requires version 28.0.0 or later, but libpng.3.dylib provides version 4.0.0”

I tried downloading & installing the latest libpng for Mac; no help.

I tried going back to 1.6.0 (by editing panda3dpaths.command and running again); no help.

I saw a note on this thread that upgrading to Mac OS X 10.5.7 might work, but there’s a known sleep bug (at least on MacBook), so I’d rather wait until that gets fixed.

Meanwhile can I just update some paths?

I’ve never used Apple’s dev tools so I doubt I could successfully build from scratch, though I suppose I could try. I think that requires installing the Dev DVD, which I have around here somewhere…

cd /Applications/Panda3D/1.6.2/samples/Asteroids

python Tut-Asteroids.py

DirectStart: Starting the game.
Traceback (most recent call last):
  File "Tut-Asteroids.py", line 13, in <module>
    import direct.directbase.DirectStart
  File "Panda3D-tpl-rw/Panda3D/1.6.2/lib/direct/directbase/DirectStart.py", line 3, in <module>
  File "Panda3D-tpl-rw/Panda3D/1.6.2/lib/direct/showbase/ShowBase.py", line 10, in <module>
  File "/Applications/Panda3D/1.6.2/lib/pandac/PandaModules.py", line 2, in <module>
    from libpandaModules import *
  File "/Applications/Panda3D/1.6.2/lib/pandac/libpandaModules.py", line 2, in <module>
    Dtool_PreloadDLL("libpanda")
  File "/Applications/Panda3D/1.6.2/lib/pandac/extension_native_helpers.py", line 73, in Dtool_PreloadDLL
    imp.load_dynamic(module, pathname)
ImportError: dlopen(/Applications/Panda3D/1.6.2/lib/libpanda.dylib, 2): Library not loaded: /usr/X11/lib/libpng.3.dylib
  Referenced from: /Applications/Panda3D/1.6.2/lib/libpanda.dylib
  Reason: Incompatible library version: libpanda.dylib requires version 28.0.0 or later, but libpng.3.dylib provides version 4.0.0

FYI:

which python
     /usr/bin/python

python --version
     Python 2.5.1

Any tips?

Run software update, it’s said to fix the problem.

The same error was reported before:
discourse.panda3d.org/viewtopic.php?t=6333
discourse.panda3d.org/viewtopic.php?t=6291 (+fix)

Yes, I know the error was already reported, and I even linked to the same solution that you suggest! But that has bugs that are more serious (for me) than not being able to test Panda3D.

Python is cool, but cross-platform deployment is still a hassle. (Not just with Panda3D.)

When I get some time, I’ll write up a spec and look for a contractor to build what I need.

Meanwhile I think you can try this build, I think it fixes the problem:
152.10.254.215/~pro-rsoft/Panda3D-1.6.2.dmg

Thanks much for the custom build … but same error.