Numpy Pyinstaller ImportError: cannot import name multiarray
After an exchange in comments, the problem was isolated to a problem in a custom .spec
file used by the OP. In the .spec
, a line something like:
coll = COLLECT(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=None,
upx=True,
name='nptest')
had been replaced with
coll = COLLECT(exe,
a.binaries1,
a.zipfiles,
a.datas,
strip=None,
upx=True,
name='nptest')
to try to introduce a file a.binaries1
to enable pyinstaller to use some custom .dll
binaries.
In face a.binaries
is a member of the Analysis
object and needs to remain - the way to add an extra binary gile in the collect line is like this (as per the docs). note you can change the name of the file in your distribution (if needed) by altering the first member of the tuple.
coll = COLLECT(exe,
a.binaries+[('zipcontainer.dll','C:\\Windows\\System32\\zipcontainer.dll','BINARY')],
a.zipfiles,
a.datas,
strip=None,
upx=True,
name='nptest')