ironpython numpy_将numpy加载到IronPython中

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

解决方案

I have used the Numpy implementation for IronPython from Enthough. It works so far, but I have not tested it enough.

I have blogged about it here

Numpy for .NET is implemented though wrappers to native calls.

In my blog post I used this tutorial.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值