How Can I Make A Windows Executable With Pyserial?

拈花ヽ惹草 提交于 2020-01-04 01:55:31

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!