Panda and Python 2.5

So the active python build I am using is downloadable form here

http://www.activestate.com/store/productdetail.aspx?prdGuid=b08b04e0-6872-4d9d-a722-7a0c2dea2758

I have been un sucessful thus far in building Panda 3D with python 2.5. That said the first build I made was with active python and I didn’t remove the ./built folder when trying with standard python2.5.

Building a standard 2.5 version now.

See you in an hour or so.

Robert

Ps the problem I am trying to solve is being able to make an installer of my game that contains active python 2.5.x using this method.

I’d like to mention that I just added python 2.5 support to the CVS repository. The latest daily build (at the bottom of the software downloads page) uses python 2.5.

I am just downloading the source now. I will try compiling with the active python version I would like to use. :smiley:

Compiling now… (I had the platform SDK not found error again, but changed the code in makepandacore.py to suit my SDK)

I may need to get a different SDK because the C4005 warnings I metioned before are still there… This is one of the warnings…

C:\Program Files\Microsoft Platform SDK for Windows XP SP2\include\specstrings.h (361) : warning C4005: ‘__inout_bcount’ : macro redefinition
C:\Program Files\Microsoft Visual Studio 8\VC\include\sal.h(529) : see previous definition of ‘__inout_bcount’

I’m guessing that the files in question are c++ headers the numbers in () are line numbers in the header. It seems that there may be differences between the 2 files… ?? i don’t know I’m not much of a c++ guy.

Robert

/agree

enn0x: This topic has diverged a bit from what I asked. It is now about COMPLIING the panda3d source code to use with python 2.5. I am looking at the solution you posted above and it seems as though you are saying that just changing the pandac.preload.py as you described that you can use the standard panda3d 1.4.2 for windows download WITHOUT having to compile from the souces. Correct?

I ask this because I am not very versed with using a C/C++ compiler. That is another goal AFTER I become versed with python through using it with Panda.

Shaba1, libraries linked with python2.4 will not work with python2.5 or any other version. You will have to compile Panda3D from source. Or, wait until a new ‘daily’ build comes out.

No. To be able to use Panda3D from Python 2.5 you have to compile and link it against Python 2.5. You can’t just take binaries compiled for Python 2.4 (the default Panda3D 1.4.2 distribution) and load them in Python 2.5.

Compiling and linking with Python 2.5 has not been the problem. Works almost out of the box for Panda3D 1.4.2. The problem has been that the result of the compilation is a .dll file. The extension is mandatory because of internal Panda3D workings on the C++ layer. The problem: Python 2.5 can’t import a .dll file, because it scans for .pdy files only. So dead end now. Everything fine, except the filenames. The trick is to make Python 2.5 import a C++ extension which is not named .pyd but named .dll.

If you can’t compile yourself: Look at the downloads section. The latest snapshot (2007.12.11) is A.F.A.I.K. compiled for Python 2.5.

The Panda3D team has cleaned up a lot and done it way better in this release (better than my hasty fix). So the information in this thread is outdated by now.

enn0x

Don’t forget, this problem was already solved in the latest daily build.

Ok I am downloading the lateste snapshot. Should I install it right over the present 1.4.2 build? In the same directory or should I uninstall that build and then install this one?

You should uninstall 1.4.2. The daily build will most likely be put in a 1.4.3 directory, and installed beside 1.4.2, and you will have two conflicting python versions then. It’s best to uninstall 1.4.2 first.

Thanks enn0x and pro-soft. I installed the daily build and all the demo programs seem to work as advertised without changing my python 2.5 path. On to coding something myself.