Mac Installation

Hello. I am using Powerbook G4 Mac laptop and I have downloaded and installed Panda 3d, Python 2.6.1, and Cg. After I installed all of these, I ran the Panda 3d sample and it said it could not find direct.DirectBase. Anyone know the problem?

Panda3D is compiled against Apple’s system copy of Python, which is 2.5.
Make sure you are running Apple’s Python instead of your customly installed Python.
To make that easier, run “ppython” instead of “python” - this is nothing but a symlink to /usr/bin/python, where Apple’s copy of Python resides.

EDIT: Apologies - 1.6.0 doesn’t have “ppython”. I’ll add it for the next release.

As an aside, the panda3dpaths.command does not work if you are using tcsh. I hacked my own .cshrc to make it work.

As an aside, why are you not using an package installer? Given that you are targeting 10.5+ you could use the new installer format and you could break it down into:* Dependency checking

  • Source installation
  • Environment setup using the scripting framework

If there is interest, I could mock up a proof of concept bundle.

That’s what we first tried. It appeared to be more problematic than expected, hard to uninstall, and not really very portable.
In the end, we voted for an easy-to-distribute .app with a script that adds paths to .bash_profile, with the idea in mind that anyone who is smart enough to change the default shell, is smart enough to configure the paths himself. Apparently, we were right. :slight_smile:
Of course, the script could be extended to add the paths to .cshrc as well - I’d be happy to accept patches for that.

This is why I ask first :wink:

Where do I submit the patch and what format do you like your patches in?

Here, or the bugtracker, or my email (click the email link below this post).
I don’t care what format it is in, I can manage with a full file instead of a patch too. As long as I can decipher it somehow.

Hello,

So, in the end, what’s the answer of the original question ?
I’m on a Mac too and got the exact same error message:

Followed the instructions to install the pack and received a confirmation saying that Panda3D is well configured.

Is it a path problem ?
Even if it is, I put that unfound file in my original Python scripts’s doc and stil the exact same error message.

A more detailed solution will be perfect for me.
Thanks in advance for your help and… good night… I’m done for tonight… It’s 4am here!

Naw, you should run either ppython or /usr/bin/python directly instead of just “python”.

Mmm :confused:
There is no file/ dir called python on /usr/bin

Will search for ppython…

What about this solution: https://discourse.panda3d.org/viewtopic.php?t=6092&highlight=mac

You’re running Leopard, right? And you didn’t install any other copy of Python, I hope? Panda uses the version of Python that Apple shipped with.

Does this file exist?
/System/Library/Frameworks/Python.framework/Versions/2.5/bin/python

Pro-rsoft, we already talked about this. I use a PB G4, too. Out of the box OS X.5, Python 2.5, CG tools installed. Same install that worked for my Intel iMac, another MacBook and a MacBookPro.
No matter if I use ppython or python in Terminal, I get the same Python input prompt.

Running a Panda script, it gives me ( dpaste.com/87773/ ):

$ ppython /Applications/Mare\ Ceti/mcstart.py 
Traceback (most recent call last):
  File "/Applications/Mare Ceti/mcstart.py", line 1, in <module>
    from mcscripts import mcmenu
  File "/Applications/Mare Ceti/mcscripts/mcmenu.py", line 1, in <module>
    from pandac.PandaModules import loadPrcFileData
  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): Symbol not found: __ZN6squish10DecompressEPhPKvi
  Referenced from: /Applications/Panda3D/1.6.2/lib/libpanda.dylib
  Expected in: dynamic lookup

So I guess this is a PPC thing.

Bradamante, that is an entirely different problem - but the fact that you two have the same computer might indicate that he might run into the same issue later.

Still, I know the solution to that problem - I can fix that one for the upcoming 1.7.0 release.

Indeed, Leopard is running… and fast! :slight_smile:
I downloaded and installed the python’s version 2.5 myself! Is it a bad thing, doctor ? :cry:

No, it doesn’t!
The only directory which looks more or less the same is located here:
Developer/SDKs/MacOSX.5.sdk/system/library/frameworks/python.framework/versions
Under versions; there is 3 dir: “2.3”, “2.5” and “Curent”

Huh. Could it be possible that you messed up your system’s directory structures? I think Python 2.5 was supposed to be shipped by default, in Leopard.

Er, no, lest this version of Python is compatible with the one that Panda was built against.

Don’t think so as I’m using python for other softwares and it’s working fine!

It’s the case, I miserably installed the same version twice!!!

When looking in the Python’s Path Browser, I find following paths :
/User/tallmystcarpet/Documents
/Applications/MacPython 2.5/IDLE.app/Contents/Ressourses
/library/Frameworks/Python.framework/versions.2.5.lib …etc

Is Panda supposed to be somewhere in this Path Browser ?

Wait a sec, are you using Snow Leopard or Leopard?

You can try running “python2.5” instead of “python”, does that work?

That’s a good question!
I know that I’m on Mac OS X 10.5.8 (9L31a) and I suppose that it’s Leopard!
And by default, I’m using the IDLE 1.2.4 for Python 2.5.4 more precisly.

Anyway, I tried to append the Panda directory to my Python paths by using:

Import sys
sys.path.append("/Applications/Panda3D")

Command was accepted but it didn’t work.
:frowning:

Oh, that might be the problem. Can you try the plain-vanilla “python2.5” from the Terminal?

Don’t worry about the PYTHONPATH, when you’ve installed Panda3D from the dmg, and followed the instructions perfectly, this should be handled automatically by the ~/.bash_profile script.

Can I try the plain-vani-what ?
Sorry, don’t know that and google brings me to some museum and architerical stuff!!!

Know that it can be boring to explain all these stuff to a Panda newbee… Thanks for your patiance :wink:

Go to the Terminal, cd to the dir of your app / sample program, and run your python application using “python2.5”.