Cross compile generation of .pyc from .py files...

Just just at xs4all.nl
Wed Mar 1 12:32:06 EST 2006


In article <1141234081.046271.326160 at i39g2000cwa.googlegroups.com>,
 venkatbo at yahoo.com wrote:

> Terry Reedy wrote:
> > ...
> > I am under the impression that .pyc files are system independent.
> > Have you tried simply copying them over?
> >
> > tjr
> 
> Hi Terry,
> 
> It appears that python on the target ppc system is expecting to see
> ppc-related info in the .pyc files.

There is no such thing.

> These .pyc were generated at cross
> compile time (on i686 system) and packaged, deployed, installed on the
> ppc system.  The "...has bad magic..."  appears to indicate that
> ppc-version of python is expecting to see ppc-specific .pyc files, but
> is encountering i686-specific .pyc files... For some reason, the
> cross-compile step that results in the .pyc files is not generating
> them for the proper ppc-target, but is building them for the i686
> system where they were being cross-compiled...

.pyc files are only compatible with the same major Python version, so it 
sounds like you're using different versions on both platforms.

Just



More information about the Python-list mailing list