473,387 Members | 1,573 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,387 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 2687
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.