xcode importerror

Return to Installation

xcode importerror

Postby kampfgnu » Sat May 09, 2009 1:35 pm

i set up panda on my hackintosh, the samples run fine in terminal:
python Tut-bla.py

now i created a project in xcode, made a custom executable with the path to python and to my main.py.
but when i run the app, i get: File "/Users/kampfgnu/myStuff/dev/panda3d/Box2DTest/Main.py", line 1, in <module>
from pandac.PandaModules import *
ImportError: No module named pandac.PandaModules

so xcode seems not to find the pandamodules.

how can i tell xcode where to get the importmodules?

greets
User avatar
kampfgnu
 
Posts: 94
Joined: Thu Nov 22, 2007 10:29 pm
Location: austria, vienna

Postby rdb » Sat May 09, 2009 1:41 pm

You need to tell XCode to set the PYTHONPATH to include /Applications/Panda3D/1.6.1/lib/ .
I prefer e-mail over PM
rdb
 
Posts: 8549
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby kampfgnu » Sat May 09, 2009 1:49 pm

where do i put the path?
projectsettings or something like that?
i am a mac xcode newbie :oops:
User avatar
kampfgnu
 
Posts: 94
Joined: Thu Nov 22, 2007 10:29 pm
Location: austria, vienna

Postby rdb » Sat May 09, 2009 1:50 pm

I don't know beans about XCode, sorry. Never really used it.

Sounds like an XCode-specific question though, you might have more luck on XCode-related websites.
I prefer e-mail over PM
rdb
 
Posts: 8549
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby kampfgnu » Sat May 09, 2009 1:52 pm

ah ok i found it, but know i get this:

ImportError: dlopen(/Applications/Panda3D/1.6.1/lib/libpandaexpress.dylib, 2): Library not loaded: libp3dtool.dylib
Referenced from: /Applications/Panda3D/1.6.1/lib/libpandaexpress.dylib
Reason: image not found

any ideas?
User avatar
kampfgnu
 
Posts: 94
Joined: Thu Nov 22, 2007 10:29 pm
Location: austria, vienna

Postby rdb » Sat May 09, 2009 2:06 pm

You need to add that directory to your library path too (DYLD_LIBRARY_PATH, I believe).
I prefer e-mail over PM
rdb
 
Posts: 8549
Joined: Mon Dec 04, 2006 5:58 am
Location: Netherlands

Postby kampfgnu » Sat May 09, 2009 2:20 pm

yeah, thats it.
thanks for your highspeed answers!
User avatar
kampfgnu
 
Posts: 94
Joined: Thu Nov 22, 2007 10:29 pm
Location: austria, vienna


Return to Installation

Who is online

Users browsing this forum: No registered users and 0 guests