469,299 Members | 2,132 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,299 developers. It's quick & easy.

build python on Celeron D

Hi,
I'm having problems with python 2.4.4 built on a Celeron D. I had problems
earlier with that processor which I think has understands some 64 bit
instructions (whatever that means) but is still 32 bit. Thus when e.g. trying to
build numpy with the self built python I get that error:

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?

So my question is how do I force python to be built with 32bit?

Christian

Mar 27 '07 #1
2 2094
On Mar 26, 10:48 pm, Christian <ckk...@hoc.netwrote:
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.
Granted, I'm sure there are many ways to get said error, but that was
the most obvious from a five minute search.

Alternatively, if you haven't done so already, you may want to mail
the numpy-discussion list.

Mar 27 '07 #2
Chris Lasher wrote:
On Mar 26, 10:48 pm, Christian <ckk...@hoc.netwrote:
>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

Mar 27 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Michele Simionato | last post: by
reply views Thread by Jonathan Hilgeman | last post: by
6 posts views Thread by Marco | last post: by
1 post views Thread by Mark | last post: by
3 posts views Thread by Godzilla | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.