Error importing numpy to IronPython built-in engine

This is an extension of the question asked at:

How to install numpy and scipy for IronPython 2.7

I have successfully installed both packages and can import them from the command line using ipy.exe, but when I try to import numpy into the engine built into another .NET application, I get an error. By tracking the error in VS, I am sure that the error occurs when importing multiarray. In particular, when calling ModuleMethods.__init__() inside multiarray.py. Error message:

init () takes exactly 1 argument (0 specified)

I can add a link to NumpyDotNet and execute from NumpyDotNet * import

I have these paths in my area when I start the engine: C: \ Program Files (x86) \ IronPython 2.7 \ Lib; C: \ Program Files (x86) \ IronPython 2.7 \ Lib \ site-packages; C: \ Program Files (x86) \ IronPython 2.7 \ DLL

So, something else about my embedded environment should not be configured correctly (and it does not set "Frames = True" in the options dictionary). I saw other questions in which people run into similar problems, but not where they seem to get this far and see this error message. In my case, the numpy package was found and NumpyDotNet.dll was loading.

+5
source share

Source: https://habr.com/ru/post/1263756/


All Articles