[Pythonmac-SIG] bad magic

Dethe Elza delza at livingcode.org
Fri Sep 16 00:50:22 CEST 2005


On 15-Sep-05, at 2:07 PM, Scott Frankel wrote:


> I am just now, finally, able to upgrade osx & python to latest release
> versions: 10.4.2 & 2.4.1, respectively).  I've had half an eye on the
> traffic on this list, so installation went well.  2.4.1 is humming
> smoothly.
>
> I'm running into the following error, though, when my scripts  
> import my
> own .pyc files.
>
>     Bad magic number in <my_importable.pyc>
>
> These modules were originally written in, and compiled with, python
> v2.3.
>
> After installing python2.4.1, I also installed TigerPython24Fix and
> TigerPython23Compat.  Do I need to recompile all my modules now?

Yes,

Python does not maintain binary compatibility across point releases,  
only across sub-point releases.

So modules compiled with 2.3.1 should be OK in 2.3.2, but need to be  
recompiled for 2.4 and up.

HTH

--Dethe


"...coding isn't the poor handmaiden of design or analysis. Coding is
where your fuzzy, comfortable ideas awaken in the harsh dawn of reality.
It is where you learn what your computer can do. If you stop coding,
you stop learning."     Kent Beck, Smalltalk Best Practice Patterns




More information about the Pythonmac-SIG mailing list