Create this file :-
import email
msg = email.MIMEText.MIMEText("dsafdafdasfA")
print "ok"
Create setup.py like below :
from distutils.core import setup
import py2exe
setup(console=['testmime.py'])
Run python setup.py py2exe and you will get errors
The following modules appear to be missing['email.Generator', 'email.Iterators', 'email.Utils']
And your program will bombed out with errors like ""Import error : No module name text"
To solve this i just added " print self.__name__" under __init__.py of \email package.
And it seems the LazyImporter is confusing py2exe.
Solution ?
import email
import email.mime.text
import email.iterators
import email.generator
import email.utils
Thursday, July 31, 2008
Subscribe to:
Post Comments (Atom)
Hi!!
ReplyDeleteDid you get a solution for this problem?? I have right the same issue!!
Thank you!
The solution is as written at the end of the posting. just import those at the top of ur module.
ReplyDeleteI'm using python 2.6 and this solution does not work for me. Any other ideas?
ReplyDeletetry bbfreeze.
ReplyDeleteJust type :
bbfreeze xxxx.py (ur main py file)
http://pypi.python.org/pypi/bbfreeze/0.96.5
same problem here with email modules and py2exe
ReplyDeletei will try bbfreeze and update here