![](https://secure.gravatar.com/avatar/faf9400121dca9940496a7473b1d8179.jpg?s=120&d=mm&r=g)
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