Problem with cx_freeze / FreezePython

K

Kevin Walzer

I am trying to build a simple "hello.py" script with cx_freeze, but am
not having any luck. Every time I run the FreezePython utility I get
this error message:

Traceback (most recent call last):
File
"/Users/kevin/Desktop/cx_Freeze-3.0.2/initscripts/ConsoleKeepPath.py",
line 15, in ?
exec code in m.__dict__
File "FreezePython.py", line 1, in ?
import optparse
File "/usr/local/python-unix/lib/python2.4/optparse.py", line 72, in ?
from gettext import gettext as _
File "/usr/local/python-unix/lib/python2.4/gettext.py", line 49, in ?
import locale, copy, os, re, struct, sys
ImportError: Failure linking new module:
/Users/kevin/Desktop/cx_Freeze-3.0.2/build/struct.so: Symbol not found:
__PyFloat_Pack8
Referenced from: /Users/kevin/Desktop/cx_Freeze-3.0.2/build/struct.so
Expected in: dynamic lookup

I've seen a similar error reported before, but no solution.

This may be related to my setup, which is non-standard. I've built
cx_freeze on Mac OS X (Darwin) using the "universal binary"
dual-architecture structure (PPC/i386) of the Mac. I had to hack the
setup files to get cx_freeze to build. (I'm using cx_freeze instead of
the standard Mac build tool py2app because I'm using a normal Unix build
of Python that links against X11 Tkinter.)

Any advice is appreciated.
 
L

Luca Masini

Kevin Walzer said:
I am trying to build a simple "hello.py" script with cx_freeze, but am
not having any luck. Every time I run the FreezePython utility I get
this error message:

Traceback (most recent call last):
File
"/Users/kevin/Desktop/cx_Freeze-3.0.2/initscripts/ConsoleKeepPath.py",
line 15, in ?
exec code in m.__dict__
File "FreezePython.py", line 1, in ?
import optparse
File "/usr/local/python-unix/lib/python2.4/optparse.py", line 72, in ?
from gettext import gettext as _
File "/usr/local/python-unix/lib/python2.4/gettext.py", line 49, in ?
import locale, copy, os, re, struct, sys
ImportError: Failure linking new module:
/Users/kevin/Desktop/cx_Freeze-3.0.2/build/struct.so: Symbol not found:
__PyFloat_Pack8
Referenced from: /Users/kevin/Desktop/cx_Freeze-3.0.2/build/struct.so
Expected in: dynamic lookup

Maybe cx_Freeze was not able to find a shared library needed by struct.so
because it is not a pure python module.

Can you post the "hello.py" you are trying to build ?

Regards.

Luca.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top