Ironpython call numpy problem

孤街醉人 提交于 2019-12-21 22:16:27

问题


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

What's wrong? Thanks.


回答1:


From the comments, it looks like Giles' answer did the trick:

From looking at the IronPython source, it looks like you'll need to set LanguageSetup.Options["Frames"] = ScriptingRuntimeHelpers.True when you're setting up hosting.



来源:https://stackoverflow.com/questions/3069820/ironpython-call-numpy-problem

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!