问题
I am trying to make an executable of a Stackless Python 2.6 program. The setup file is
from distutils.core import setup
import py2exe
setup(console=['controller.py'])
and I run it with
python setup.py py2exe
However, when I try to run it, it raises an ImportError and says that there is no module named serial. When I try:
python setup.py py2exe --includes serial
or
python setup.py py2exe --includes pyserial
the build fails with an ImportError. Do you have any ideas?
回答1:
Had same issue. Upgrading pyserial to 2.5 solved the problem: exec built without additional "includes" contains pyserial.
来源:https://stackoverflow.com/questions/9718675/how-can-i-make-a-windows-executable-with-pyserial