I’m such a glutton for punishment, I’m going to try building panda on ubuntu again.
In the first step, building ppremake, I get this curious error:
filename.h:136: error: â€˜vector_stringâ€™ has not been declared
say, is vector_string.h supposed to have anything in it? Mine’s completely empty:
badzmaru@silverado:~/panda/src/panda3d-1.5.3/ppremake$ more vector_string.h
// Filename: vector_string.h
// Created by: drose (15May00)
I brought in the header from a previous version of panda and it got past that, then died a little later missing things from ExecutionEnvironment.
Actually it looks like executionEnvironment.h and globPattern.h are also truncated. I’m using the panda3d-1.5.3.tar.gz source. hmm maybe my download got corrupted.
Yeah. Disney used a script to change the license in all the header and source files, but it was a bit buggy, resulting in accidentally truncated files. Some of these truncations were not fixed in time, before 1.5.3 was released. I picked up the changes for 1.5.4, but in the meanwhile, you can use this command to check out the fixed files from CVS:
(make sure you’re in the panda3d source root:)
rm -rf ppremake
cvs -d :pserver:email@example.com:/cvsroot/panda3d checkout ppremake
automake --foreign -a
and then you should have ppremake built.
Alternatively, (and more recommended) it’s easier to use the makepanda build system instead (which doesn’t rely on these fixes), to build panda it’s as easy as:
python makepanda/makepanda.py --everything --installer
Then you should have a .deb file in the same directory which you can install.
I really recommend using makepanda, unless there’s a special reason to use ppremake instead.
Great, thanks. I figured it was something like that, computers run amok.
True, I’ve always found makepanda to be fast and painless - I’m only using the other build system so I can try and get the maya converter.
If someone can send me a copy of the Maya SDK (meaning the lib/ and include/ dirs) I’ll be happy to add support for Maya to makepanda.
I’ve just added Maya support on Linux and OSX to CVS, for the ones interested.
Does this mean that the makepanda in CVS is working on OSX? I had downloaded the complete source bundle for 1.5.3, but immediately ran into some issues. Grabbing modified source from links in this thread got me past the initial problems, but the build still seemed to produce errors. Just to clarify, after running makepanda.py, I should be able to import direct.directbase.DirectStart from a Python command line and use run() to see a grey screen right?
At any rate, I’m trying to compile and install using the ppremake method right now, I guess we’ll see how that goes.
Makepanda on OSX only works on the CVS yet, so you really need to do a cvs checkout.
Also, you will need to download the thirdparty packages for OSX. More info can be found in this thread:
No. If makepanda is completed, it should give you a “Final Status Report” like the one you get at the beginning.
You should run makepanda with the --installer option, this will produce a ready-to-use installer package in the same directory which you will able to install without trouble.
PS. I should mention that in the thread linked above you can already download ready-to-use OSX binaries.
Oh man, that’s great! I totally missed that thread. I’m going to give your binary a shot and see how it goes.
Okay, so I was able to install the binary without issues. I copied the “samples” directory from the source tarball for 1.5.3 into the 1.6.0 directory and attempted to run a few Python samples.
I ran into this error:
DirectStart: Starting the game.
Fatal Python error: Interpreter not initialized (version mismatch?)
Now, as I understand it, this is because my Python is other than the Mac Python. “which python” returns the following:
and this is soft-linked to /usr/bin/python (and it’s 2.5.2). But, when I run the samples by explicitly using “/usr/bin/python2.5 <sample.py>” they work just fine (this version is 2.5.1).
My question is, is there anyway to use the framework version of python with Panda3d? The reason I’d like to do this is that I already have a bunch of additional useful libraries (opencv, SciPy, etc) installed under the site-packages directory of this Python, and it’s kind of clunky to use different versions of Python for different scripts. If there’s no simple fix, would compiling from source fix this issue?
In that thread someone also had the same problem. Here’s the problem: you have two versions of Python on your system. Panda needs a python version equal to or newer than 2.5.1, and your system python version matches that, but your secondary version of Python is lower than 2.5.1 and thus incompatible with Panda3D.
You need to make the system version of Python the default on your system, (and most likely just copy the site packages from your secondary version to the system copy of Python.)
You can also upgrade your secondary version of python. Or entirely remove it and create a symlink to the system Python.
Building from source yourself won’t fix the problems, unless you edit the makepanda scripts to use your secondary version of python and not accidentally link the system version, which isn’t as easy as it sounds.
I understand that I’ve got two versions of Python on my machine. What was curious to me is that the version that resides at /Library/Frameworks/Python.framework/Versions/Current/bin/python is actually 2.5.2. So, it doesn’t seem that it’s a problem with the version number being too low.
Is it possible that Panda requirement was implemented as version == 2.5.1?
The reason I’d like to use 2.5.2 version is that I’d have access to a lot of useful (already installed) Python extensions like SciPy from within my Panda game scripts. This could be handy for doing things like computer vision, capturing frames and manipulating them, processing sensory information, etc.
Actually, the version that resides in there is the system version.
Hmm, then something is definitely off. There’s a Python binary at /usr/bin/python2.5 as well. When I execute the Panda samples with this Python all is well.
It’s when I use the binary located at /Library/Frameworks/Python.framework/Versions/Current/bin/python that I get the errors.
My mistake, sorry. I don’t even have /Library/Frameworks/Python.framework. The version Panda3D is linked to is /System/Library/Frameworks/Python.framework. (the difference is the “/System” at the beginning of the path, I overlooked that.)
Probably, /usr/bin/python2.5 links to that one. At least here:
In any case, it seems to be incompatible (e.g. compiled with a different compiler, or something like that).
Compiling from scratch would help if you edited makepandacore.py and replaced all instances of /System/Library/Frameworks/Python.framework with /Library/Frameworks/Python.framework.
Though I recommend to somehow find a way to remove the secondary python and make sure everything uses your system version of Python.
Cool, thanks for the help. This is really strange - I checked the /System/Library… path and that is, in fact, where the system Python is installed. /usr/bin/python2.5 is just a symlink to that location. After taking a second look at my .bash_profile file, it seems that the secondary Python is an installation of MacPython. I think this was the result of installing the “SciPy Superpack” because it includes MacPython (2.5.2) for consistency sake.
Now, I have to decide if I want to reinstall Panda from source or attempt to copy over all my site-packages from the secondary Python installation.