views:

110

answers:

2

Hi,

I've recently installed Ironpython + tools and having trouble loading external modules (numpy).

this is my test code:

import numpy
numpy.test()

when writing my simple test, intellisense can find numpy, however when it's run from vs2010, I get:

ImportException was unhandled by user code:
No module named numpy

IronPython Console output (shortened):

numpy\__init__.py line 141
numpy\add_newdocs.py line 9
numpy\lib\__init__.py line 4
numpy\lib\type_check.py line 8
numpy\core\__init__.py line 5
ImportError: No module named multiarray

the file multiarray.pyd is present in numpy\core.

I have numpy installed in my python 2.6 folder, (working). In an attempt to use it within ironpython, Following the instructions of numerous sources:

I've added "C:\Python26\Lib\" as a Search path to the project.

I've copied the site-packages, libs, include and DLLs folders from C:\Python26\ to C:\Program Files (x86)\IronPython 2.6 for .NET 4.0\

and I've added:

sys.path.append(r"C:\Python26\Lib")

to the IronPython site.py file.

I've also tried this with both x86 and AMD64 installs, including a complete reinstall of both python versions and ironpython.

Having run completely out of ideas (and the somewhat lackluster google results), I was hoping that someone here may have some suggestions.

Thanks Rabit

+2  A: 

I don't believe Numpy is supported for IronPython: http://en.wikipedia.org/wiki/IronPython

Unless it's changed since that update. :(

Update: Apparently there are projects underway to get support for some of the CPython stuff which in turn would help support Numpy http://www.resolversystems.com/news/?p=17

Update 2: Apparently you can use numpy with some other open source product: http://ironpython-urls.blogspot.com/2008/08/ironclad-05-released-use-numpy-from.html

Update 3: Official link to Ironclad => http://code.google.com/p/ironclad/

Sorry, I'm not sure if this is of much help :(

townsean
ahhh pants, everything interesting depends on numpy =[I'll have a look into that IronClad suggestion wiki makes, and let you know how I get on. The ultimate goal is for pycuda, so I'll have a look into the other CUDA modules if it doesn't work and let you know how I get on.Ta,Rabit
Dead.Rabit
good luck with that :)
townsean
Ok, Update 1, apparently when I re-downloaded ironpython, I got the 2.7 version... which would explain my most recent spate of errors
Dead.Rabit
update 2: there is no ironpython 2.7, there is however an ironpython tools 2.7, which is confusing...
Dead.Rabit
IronPython Tools in the same stage of development as IronPython 2.7 - which is both are currently an alpha. Plan is to release a beta of both soon. They sim ship and the tools rely on various changes in IronPython 2.7 that are there to support them. So that's the reason they're together.
Dino Viehland
A: 

update 3: wrong twice, ip tools and ip are frustratingly bundled together... which vs2010 doesn't like. Getting closer though.. Currently working with 2.6 for .net4 in ipy console

http://code.google.com/p/ironclad/issues/detail?id=28

^^ explains that frames support is required for ironclad (something not mentioned too clearly)

also that this is potentially not fixed within the new 2.6 for .net 4, going to play with "frames" settings and/or try an older still version of ip

Dead.Rabit