When I try to convert my functioning .py
file to an .exe
, the resulting executable fails with the following message:
Traceback (most recent call lat): File "geciputtony.py", in line 6, in <module> ModuleNotFoundError: no module named 'pySMART' [PYI-10216:ERROR] Failed to execute script 'geciputtony' due to unhandled exception.
Unfortunately, the ModuleNotFoundError
doesn’t occur when I run my .py
script in Visual Studio Code.
I made my .exe
using PyInstaller, which I installed via pip install pyinstaller
on Windows 10. Then I navigated to the .py
file’s directory with cd
, and then I typed: pyinstaller --onefile geciputtony.py
. It said
1094 INFO: Building EXE from EXE-00.toc completed successfully.
Do you have any idea, why is the reason behind it, and how to fix it? (I am suspecting something is wrong with the packing method or something like that, but I have no idea.)
from pySMART import Device
from pySMART import DeviceList
from pySMART import Attribute
from pySMART import SMARTCTL
The whole file can be downloaded from MediaFire.
HumbleProgrammer is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1