Reputation: 21
i recently made a pyqt5 app for a college project after i finished i tested it and everything worked fine thats until i converted the .py to a .exe using auto-py-to-exe(pyinstaller) i am now getting this error no matter what i do [Failed to execute script "name" due to unhandled exception :module 'numpy' has no attribute '_NoValue'] i searched online and imported numpy to test and there is in fact no such thing as numpy._NoValue, now i am stuck on what to do
this is the popup i get when running the exe
Upvotes: 2
Views: 2491
Reputation: 56
I solved it by adding an explicit import numpy as np
in script. (Found by chance)
I am using pyinstaller==5.1, python3.9
I guess pyinstaller does not handle numpy import through other package (in my case numpy was imported by matplotlib)
same type problem can be found here In PyInstaller, Why Won't NumPy.Random.Common Load as a Module?
Upvotes: 1
Reputation: 275
I was facing the same error and I managed to fix it by changing the python version.
I was at the version 3.9.x and when I changed to the version 3.7.9 it worked.
Upvotes: 0