0

I get an error when trying to run my executable Pyinstaller file as follows: Importing the nump C-extensions failed. Original error was: DLL load failed while importing _multiarray_umath: The specified module could not be found.

I have tried uninstalling numpy and setup tools, and then reinstalling but that did not work.

I have tried pip installing msvc-runtime with no luck either.

I currently run Pyinstaller in Powershell: Enter venv pyinstaller --onefile --paths {I enter my script's Lib/site-packages path here} app.py

I have read that I may need to add my Python 3.9 path here?

Any other ideas?

Thanks

Vikram
  • 33
  • 6

1 Answers1

0

I get the same error when distributing a shiv package that I maintain at work. It works fine if I send it to someone with the same numpy version as me but fails to load the c-extensions if the user has a different version of numpy. My understanding was that shiv, and pyinstaller in this case, bundled all the dependencies. I do have numpy bundled in there, but it seems that the c-extensions don't come along with it. Every post I've found on this error was either related to an IDE environment or telling me to reinstall numpy. Python: 3.8.5 through Anaconda numpy: 1.19.2