build python on Celeron D

Christian ckkart at hoc.net
Tue Mar 27 07:26:48 CEST 2007


Chris Lasher wrote:
> On Mar 26, 10:48 pm, Christian <ckk... at hoc.net> wrote:
>> Traceback (most recent call last):
>>   File "setup.py", line 89, in ?
>>     setup_package()
>>   File "setup.py", line 59, in setup_package
>>     from numpy.distutils.core import setup
>>   File "/mnt/home/ck/prog/scipy/numpy-1.0.1/numpy/__init__.py", line 36, in ?
>>   File "numpy/core/__init__.py", line 5, in ?
>>     import multiarray
>> ImportError:
>> /media/hda6/home/ck/prog/scipy/numpy-1.0.1/numpy/core/multiarray.so: undefined
>> symbol: Py_InitModule4
>>
>> which is related to 32<->64 issues, right?
> 
> <http://www.thescripts.com/forum/thread35987.html>
> 
> Do you have more than one Python installation on this machine? The
> link above indicates that if you build NumPy with a different build of
> Python than you will run it from, you will get this same error.

Yes, but I took care to not confuse them.

> Granted, I'm sure there are many ways to get said error, but that was
> the most obvious from a five minute search.

I found that:

"To prevent loading extension modules that assume a 32-bit size type into an
interpreter that has a 64-bit size type, Py_InitModule4 is renamed to
Py_InitModule4_64." (http://www.python.org/dev/peps/pep-0353/)

So as numpy's setup.py cannot call 'Py_InitModule4' this means, that the
interpreter is built for 64bit systems. Maybe numpy is more accurate in testing
wether it run's on 64 or on 32 bit than the python build script itself and
therefore expect's Py_InitModule4 to be present.

Isn't there perhaps a configure option to force 32 bit?

Christian




More information about the Python-list mailing list