Reputation: 309
I am trying to build an executable with Nuitka, for the following simple code:
from numpy import abs
var = raw_input("Please enter something: ")
print "you entered", var
print abs(-43.2)
var2 = raw_input("Secundo: ")
print var2
The Nuitka code I compile is:
nuitka --standalone --show-scons FILENAME
This is obviously a simplification of my problem. I tried compiling without numpy and without using "abs", and the exectuable executes perfectly. However, when I compile with the numpy code, and I try to execute the resulting .exe, I get the following error:
Traceback (most recent call last): File "...\__init__.dist\__init__.py", line 1, in <module>
File "...\__init__.dist\numpy\__init__.py", line 142, in numpy
File "...\__init__.dist\numpy\add_newdocs.py", line 13, in add_newdocs
File "...\__init__.dist\numpy\lib\__init__.py", line 8, in lib
File "...\__init__.dist\numpy\lib\type_check.py", line 11, in type_check
File "...\__init__.dist\numpy\core\__init__.py", line 14, in core
ImportError: LoadLibraryEx '...\__init__.dist\numpy\core\multiarray.pyd' failed
I am using Python 2.7.8 64bit, Numpy 1.11.3 64bit, Nuitka 0.5.24.4
How can I solve this? Is Nuitka not compatible with Numpy?
The following is found in the init.dist folder:
│ bz2.pyd
│ gpsvc.dll
│ mfc90.dll
│ msvcr90.dll
│ msvcrt.dll
│ nlaapi.dll
│ python27.dll
│ pywintypes27.dll
│ sysntfy.dll
│ tree.txt
│ unicodedata.pyd
│ win32api.pyd
│ win32pdh.pyd
│ win32ui.pyd
│ _win32sysloader.pyd
│ __init__.exe
│
└───numpy
├───core
│ multiarray.pyd
│ umath.pyd
│
├───fft
│ fftpack_lite.pyd
│
├───linalg
│ lapack_lite.pyd
│ _umath_linalg.pyd
│
└───random
mtrand.pyd
Upvotes: 8
Views: 1254
Reputation: 1
it is recommended to use --plugin-enable=numpy
to fix this issue
So, in your case it would be something like this :
nuitka --standalone --show-scons --follow-import-to=numpy --plugin-enable=numpy FILENAME.py
Upvotes: 0