py2exe does not work with the standard email module
Hello. I am trying to use py2exe for converting a script into an exe. The build process shows this:
The following modules appear to be missing
The executable does not work. The referenced modules are not included. I researched this on the Internet and I found out that py2exe has a problem with the Lazy import used in the standard lib email module. Unfortunately I have not succeeded in finding a workaround for this problem. Can anyone help?
Thank you,
P.S. Imports in the script look like this:
Code: Select all import string,time,sys,os,smtplib from email.MIMEMultipart import MIMEMultipart from email.MIMEBase import MIMEBase from email.MIMEText import MIMEText from email import Encoders
Have a look at this question how-to-package-twisted-program-with-py2exe it seems to be the same problem.
The answer given there is to explicitly include the modules on the command line to py2exe.