Universal Mac OSX binaries/installer

Hi all,

Just want to announce I got Mac support for makepanda finished, polished off, and checked into CVS. I’m hoping 1.6.0 and later will have Mac binaries on the download page.
I especially want to thank fprimex, _Hypnos and swiftcoder for their great support in this.

I also ported most of the thirdparty packages. I got all of them working except for ffmpeg.

I need some people to test it though. Here’s a mac installer thats supposed to be working:
(EDIT: link removed, see download page instead)
I’m not sure but I think you need the Nvidia Cg Toolkit to get it running. You don’t need macports or so, everything should work out of the box. If not, please tell me so.
If you want to compile from source, just do a CVS checkout, and grab the thirdparty packages:
(EDIT: link removed, see download page instead)
… and just run makepanda.

If anything doesn’t work quite right, please let me know.

PS. I only tested it at OSX 10.5 and also don’t expect it to run at 10.4. If you get it running on 10.4. let me know.

Update: OpenCV is working now. I updated the dmg and added it to the thirdparty package. I guess all that’s remaining is ffmpeg.

Woohoo, now I don’t have to reboot to tinker with Panda3d! Thank you very much pro-rsoft :smiley:

BTW, to confirm your suspicions, I had to install the Nvidia CG Toolkit to get it to run - once that was installed, I had absolutely no trouble getting my test scripts written in Windows to run.

-Jim

so happy to see this package. :slight_smile:
but i have no luck in running the panda3d on my macbook pro with SPE
i’ve got this error when i running it in terminal
[color=red]Fatal Python error: Interpreter not initialized (version mismatch?)
did i set something wrong before i run my application? :frowning:
i am using Mac OS X 10.5.5

Hmm, that is odd. Can you try to go into a terminal window and type “python” and see if that gives you the python interpreter?

just type “python” in terminal
and returned this
[color=blue]Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

I’m gonna need a bit more info. Can you run “pview” without problems? If you type “from direct.directbase import DirectStart” in the python console, does that worK? Does typing in “from pandac.PandaModules import *” work?

Last login: Mon Nov 3 08:18:05 on ttys000
macbook-pro:~ Kevin$ [color=red]pview
dyld: Library not loaded: @executable_path/…/Library/Frameworks/Cg.framework/Cg
Referenced from: /Applications/Panda3D/1.6.0/lib/libpanda.dylib
Reason: image not found
Trace/BPT trap
macbook-pro:~ Kevin$ python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.

[color=red]from direct.directbase import DirectStart
DirectStart: Starting the game.
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
macbook-pro:~ Kevin$ python
Python 2.5 (r25:51918, Sep 19 2006, 08:49:13)
[GCC 4.0.1 (Apple Computer, Inc. build 5341)] on darwin
Type “help”, “copyright”, “credits” or “license” for more information.
[color=red]from pandac.PandaModules import *
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
macbook-pro:~ Kevin$

thanks for your help~ you are very helpful :slight_smile:

That looks like you need to download and install the NVIDIA Cg Toolkit:
developer.nvidia.com/object/cg_toolkit.html

i can run pview now and it returned a panda viewer after install the cg 2.1
but i still no luck on running “from pandac.PandaModules import *” and “from direct.directbase import DirectStart” :cry:

Are you getting the exact same error as before? Hmm, that’s really weird. I’ve never seen that error before.

I googled a bit and it turns out it can occur if the python version is too old. I see you’re running Python 2.5 while I compiled it at Python 2.5.1 – can you try upgrading your version of Python installed? (I think OSX’s update system can update it for you).

(However, don’t upgrade it all the way to version 2.6!)

Kinzia,

As best I can tell Panda is defaulting to a version of Python other than the one installed by the system. Did you install Python 2.5 from MacPython for another application such as Scipy?

Try “which python” at the command prompt. It should return:
/usr/bin/python

If it does not say “/usr/bin/python” then you may need to adjust your .bash_profile in your home directory or uninstall the older version.

You can also try running a Panda application by using the explicit path to the bundled Mac python:
/usr/bin/python Tut-Asteroids.py

really thks all of you guys
I will try it later and report here :astonished:

well~
i can run the panda3d on my mac by using fprimex suggestion
i can’t run the panda3d when i using this command in terminal
[color=red]python /Users/KevinChow/Documents/pandatest.py~
DirectStart: Starting the game.
Fatal Python error: Interpreter not initialized (version mismatch?)
Abort trap
but after i try fprimex suggestion then using this command in terminal again
[color=darkblue] /usr/bin/python /Users/KevinChow/Documents/pandatest.py
DirectStart: Starting the game.
Warning: DirectNotify: category ‘Interval’ already exists
Known pipe types:
osxGraphicsPipe
(all display modules loaded.)
it’s work now! although it can run, I dunno why it’s work! could anyone tell me the serect?

:bulb:

The problem was, that besides your system version of Python, you had another version of python installed. If you typed “python” at the command prompt, it defaulted to your second python installation and not your system installation – that’s why you had to type the path to the right python manually to make it work.

Thank you very much for that great installer.

Unfortunately I can’t compile the demo app from the docu at http://www.panda3d.org/manual/index.php/Starting_Panda3D_(CXX).

When I try to run:

g++ -c filename.cpp -o filename.o -fPIC -O2 -I /usr/include/python2.5 -I /Applications/Panda3D/1.6.0/include/

it works and creates a filename.o file.

But when I try to make an bin out of it:

g++ filename.o -o filename -fPIC -L /Applications/Panda3D/1.6.0/lib/ -lp3framework -lpanda -lpandafx -lpandaexpress -lp3dtoolconfig -lp3dtool -lp3pystub -lp3direct

I get this error:

Please help :slight_smile:

Interesting. What do you get if you do:

ls /Applications/Panda3D/1.6.0/lib/ | grep framework

Hola pro-rsoft,

thanks for your quick reply.

The output is:

I suspect this has something to do with the install_name set in the .dylib file.
Look, if you do an “otool -L libp3framework.dylib” on your file, you can see that the install_name is set to something like built/lib/libp3framework.dylib, which is what it was set to when it was built.
You can use install_name_tool to change the install_name to libp3framework.dylib which is how it should be.

I’ll make sure this gets fixed, and will let you know when I’ve updated the dmg. Thanks for reporting this!

Thank you very much for fixing this.

I’m not exactly sure how to use install_name_tool. I tried this but it didn’t work.

install_name_tool -change built/lib/libp3framework.dylib libp3framework.dylib  /Applications/Panda3D/1.6.0/lib/libp3framework.dylib