I have the following code
from win32 import win32print
for p in win32print.EnumPrinters(win32print.PRINTER_ENUM_LOCAL, None, 1):
_, _, name, _ = p
print (name)
The code works. I'm trying to create an exe file from it as follows:
cd C:\Users\xralf\AppData\Local\Programs\Python\Python38-32\Scripts
pyinstaller.exe --onefile C:\Users\xralf\Desktop\enumprinters.py
cd dist
enumprinters.exe
It writes the following error message:
ImportError: DLL load failed while importing win32print: The specified module could not be found.
How can I fix it?