debug build: import problem

B

benevilent

Hey,

I have made a Python build with the flag --with-pydebug. When I try to
import modules such as NumPy's multiarray.so, I get errors like the
following:

File "/usr/lib/python2.3/site-packages/Numeric/Numeric.py", line 91, in
?
import multiarray
ImportError: /usr/lib/python2.3/site-packages/Numeric/multiarray.so:
undefined symbol: Py_InitModule4

I presume this means that a debug build of python uses a different
function for initialising a python module. Is it possible to avoid the
situation where each module not included within the Python distribuition
requires explicit support such that it can be used with a debug build of
Python?

Thanks,
Laurie
 
A

Alex Martelli

Hey,

I have made a Python build with the flag --with-pydebug. When I try to
import modules such as NumPy's multiarray.so, I get errors like the
following:

Have you built and installed NumPy _with the specific build of Python
you're trying to use it from_? It doesn't look like you have, and that
might explain the symptoms you observe.
I presume this means that a debug build of python uses a different
function for initialising a python module. Is it possible to avoid the
situation where each module not included within the Python distribuition
requires explicit support such that it can be used with a debug build of
Python?

In general, each module which is a Python extension may require you to
build it with the specific version of Python you want to use it with.
There may be specific tricks that work on a given platform to let you
bypass this normal requirement in some cases, I guess.


Alex
 
B

benevilent

Hey,

Have you built and installed NumPy _with the specific build of Python
you're trying to use it from_? It doesn't look like you have, and that
might explain the symptoms you observe.

Yeah, building NumPy with the compilation flags set to use the right build
seems to have fixed the problem.
 

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,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top