Panda3D, Eclipse and Pydev on Mac?

I am using Mac OS X Leopard 10.5.8 and I am trying to get Panda3D work under Eclipse and Pydev (Eclipse plug-in for Python).

I get only errors, when I try to run my game in Eclipse, but when I run the same game in command prompt, the game works.

If somebody has got the Panda3D work under Eclipse and Pydev, could you please share, what configurations have you done to Eclipse and Pydev?

I have done the following configurations in Eclipse/Pydev:
Project Porperties -> PyDev Intrepreter/Grammar -> “Click here to configure…” -> New Folder
And added the following folders:
/Applications/Panda3D/1.6.2/lib
/Applications/Panda3D/1.6.2/lib/direct
/Applications/Panda3D/1.6.2/lib/pandac

But I get the following errors under Eclipse/Pydev:

DirectStart: Starting the game.
Traceback (most recent call last):
  File "/.../src/main.py", line 9, in <module>
    from Game import Game
  File "/.../src/Game.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 1, in <module>
    from libpandaexpressModules import *
  File "/Applications/Panda3D/1.6.2/lib/pandac/libpandaexpressModules.py", line 1, in <module>
    from extension_native_helpers import *
  File "/Applications/Panda3D/1.6.2/lib/pandac/extension_native_helpers.py", line 75, in <module>
    Dtool_PreloadDLL("libpandaexpress")
  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/libpandaexpress.dylib, 2): Library not loaded: libp3dtool.dylib
  Referenced from: /Applications/Panda3D/1.6.2/lib/libpandaexpress.dylib
  Reason: image not found

Hi, welcome to the Panda3D Forums! :slight_smile:

Check out these threads, they should help you with that problem:
discourse.panda3d.org/viewtopic.php?t=6092
discourse.panda3d.org/viewtopic.php?t=6882

Thanks!

I created the environment.plist and also added DYLD_LIBRARY_PATH to the Eclipse (from Project Properties -> PyDev Intrepreter/Grammar -> “Click here to configure…” -> Environment-tab -> New. And added the following: Name: DYLD_LIBRARY_PATH and Value: /Applications/Panda3D/1.6.2/lib)

Now the game runs normally from Eclipse. But the code highlight section of Eclipse still shows that there are problems, for example:
Undefined variable: base
Undefined variable: loader
Unresolved import: AmbientLight
Unresolved import: NodePath

Some how Eclipse itself doesn’t see the libraries. Because when I run my game from Eclipse it works. Is this fixable by some how?

Undefined variable: base
Undefined variable: loader
Unresolved import: AmbientLight
Unresolved import: NodePath

^ that should be expected. Most of this stuff gets build at run time based on C++ lib imports. So eclipse would have to run panda3d in order to resolve them.

I have been using ellipse and panda3d together and also want to know how to turn off those specific errors while working with panda3d projects. I would also like to mention that Eclipse is by far the best development environment I have ever used. :wink:

EDIT

Woah hey i figured it out hah! So if you want to turn off Pydev code analysis per file you just add this line to the top and it will deactivate :
#@PydevCodeAnalysisIgnore