[Numpy-discussion] How to build debug version ofnumarray-1.3.2?

Paul Lucek plucek at ssaris.com
Tue Jun 14 12:37:19 CDT 2005


Thanks - that's exactly it.  Importing numarray works, and the debugger gets
hooked into my extension (breakpoints functioning, etc.)



-----Original Message-----
From: Todd Miller [mailto:jmiller at stsci.edu] 
Sent: Tuesday, June 14, 2005 3:22 PM
To: Paul Lucek
Cc: numpy-discussion
Subject: Re: [Numpy-discussion] How to build debug version ofnumarray-1.3.2?

On Tue, 2005-06-14 at 11:06, Paul Lucek wrote:
> I am writing Python extensions that use numarray in MS VS.NET 2003. I
would
> like to be able to debug the extensions in the .NET debugger. I am able to
> do this with my extensions that do not need numarray. However, I can not
> "import numarray" into a "python_d.exe" session. 
>  
> I have tried to build numarray with "python_d setup.py build --debug"
> and
> then tried "import numarray" under "python_d.exe" and get the following
> message: 
>  
> >>> import numarray 
> Traceback (most recent call last): 
> File "<stdin>", line 1, in ? 
> File "C:\Python24\Lib\site-packages\numarray\__init__.py", line 42, in ? 
> from numarrayall import * 
> File "C:\Python24\Lib\site-packages\numarray\numarrayall.py", line 1, in ?

> from numerictypes import * 
> File "C:\Python24\Lib\site-packages\numarray\numerictypes.py", line 33, in
> ? 
> from typeconv import typeConverters as _typeConverters 
> File "C:\Python24\lib\site-packages\numarray\typeconv.py", line 6, in ? 
> import _conv 
> ImportError: Module use of python24.dll conflicts with this version of
> Python. 
> [47426 refs] 
>  
> Any ideas/help would be appreciated. I could not find any faq's or howto's
> on this.

I don't normally develop under windows but I was able to build and run
numarray under a debug Python this afternoon.  I did it by:

1. Deleting C:\numarray-1.3.2\build

Note that the distutils are caching so that if you rebuild with --debug
without deleting the "normal" objects/dll files numarray is not
completely rebuilt.  I think that may be your problem since I see a
similar problem in linux fairly often by accidentally installing a
cached numarray to the wrong Python.

2. Building pythoncore and python in vc.net

3. Installing numarray into the Python-2.4.1 source tree using:
	> C:\python-2.4.1\pcbuild\python_d setup.py build --debug install

4. Running python_d in-place:
          > C:\python-2.4.1\pcbuild\python_d
          >>> import numarray
	>>>

My "debug" numarray imports but vc.net doesn't seem to know where the
source is.  If you're not trying to debug numarray itself,  maybe that's
not an issue.  If you are debugging numarray,  my next guess is to build
the numarray C-extensions using a vc.net project file;  I'd derive one
from one of the standard python extensions like _socket;  the project
files look XML-ish so that should be straight forward if tedious.

I hope this helps some.  

Regards,
Todd



______________________________________________________________

NOTICE-  This communication (including any attachments) contains
confidential and/or privileged information and is intended only
for the use of the individual(s) to whom it is addressed for a
specific purpose and is protected by law.  Any review, use,
distribution, disclosure, alteration, copying, transmittal or
re-transmittal by persons who are not intended recipients of this
communication may be a violation of law and is strictly prohibited. 
If you are not the intended recipient, please permanently delete all
copies of this communication and any attachments from your computer
system, destroy any hard copies, and immediately notify the sender or
SSARIS Advisors, LLC at compliance at ssaris.com or (203) 328-7200. 
No waiver of confidentiality or privilege is made by mistransmission.

Any views expressed in this communication are those of the individual
sender.  This communication and any attachments hereto are for
informational purposes only and should not be construed as an offer
to sell interests or shares in any investment vehicle managed by SSARIS
Advisors, LLC or its affiliates.  Any information regarding trading
performance must be considered in conjunction with the appropriate
disclosure documents.  Past performance is not necessarily indicative
of future results.

SSARIS Advisors, LLC reserves the right to monitor all communications
through its networks.
______________________________________________________________






More information about the Numpy-discussion mailing list