473,326 Members | 2,133 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

debug build: import problem

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
Jul 18 '05 #1
2 2684
be********@optusnet.com.au <be********@optusnet.com.au> wrote:
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
Jul 18 '05 #2
Hey,

On Tue, 14 Sep 2004 14:44:51 +0200, Alex Martelli wrote:
be********@optusnet.com.au <be********@optusnet.com.au> wrote:
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.


Yeah, building NumPy with the compilation flags set to use the right build
seems to have fixed the problem.
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


Jul 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Dan Perl | last post by:
Is there a mechanism or an idiom for adding code for debugging so that it can easily be removed in the production code? I am thinking of something similar to the C/C++ preprocessor statements with...
3
by: Raphael Zulliger | last post by:
Hi I have to check wheter a .py script is run within the debug or the release version of an embedded python interpreter (in short, wheter python24_d.dll or python24.dll is in use). long...
4
by: VicVic | last post by:
Dear Great Experts, I have a problem and need your help! We have a Flat DLL built in C++ (CCC), and on top of it, we built another DLL built in C# (SSS), which has .Net Assembly. CCC was...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
5
by: Steve Le Monnier | last post by:
I've just noticed that the menu items available in Visual Studio 2005 for the Debug and Build menus differ significantly when compared to the menu items in Visual Studio 2003. On my C#...
1
by: Dan Maharry | last post by:
A few weeks ago, I upgraded an XML server of ours to .NET 2.0. All went fine. Then last week, I decided to remove all obsolete calls from the app and sign each project in the solution in the .NET 2...
6
by: Andrew Rowley | last post by:
I am having trouble getting debug and release builds to work properly with project references using C++ .NET and Visual Studio 2003. I created a test solution, with a basic Windows form C++...
11
by: ThunderMusic | last post by:
Hi, I have a windows service that only loads a CSV file and import it's data using SqlBulkCopy in a newly created Sql Server 2005 table using 25000 rows batches. If I build the service in debug...
4
by: bhood2 | last post by:
I've come to the conclusion that posting about Embedded Python on the Python forums is a complete waste of time. I hope I can get some useful insights here. I'm looking for some help with...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.