Ironpython呼叫numpy问题

时间:2010-06-18 13:07:25

标签: python ironpython numpy

Ironpython 2.6, python 2.6.5, numpy的, SciPy的

import sys
sys.path.append(r'D:\Python26\dll')
sys.path.append(r'D:\Python26\Lib')
sys.path.append(r'D:\Python26\Lib\site-packages')

» import numpy
Traceback (most recent call last):
  File "", line 1, in 
  File "D:\Python26\Lib\site-packages\numpy\__init__.py", line 132, in 
  File "D:\Python26\Lib\site-packages\numpy\add_newdocs.py", line 9, in 
  File "D:\Python26\Lib\site-packages\numpy\lib\__init__.py", line 4, in 
  File "D:\Python26\Lib\site-packages\numpy\lib\type_check.py", line 8, in 
  File "D:\Python26\Lib\site-packages\numpy\core\__init__.py", line 5, in 
ImportError: No module named multiarray

怎么了? 感谢。

1 个答案:

答案 0 :(得分:0)

从评论中看起来Giles' answer看起来很有效:

  

通过查看IronPython源代码,看起来您需要在设置托管时设置LanguageSetup.Options [“Frames”] = ScriptingRuntimeHelpers.True。