3

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?

Nikwin
  • 6,576
  • 4
  • 35
  • 43
  • 1
    You may need to explicitly include the DLL in the packaging. [This post](http://stackoverflow.com/questions/220777/including-pyds-dlls-in-py2exe-builds) discusses it in more detail. – ConcernedOfTunbridgeWells Mar 15 '12 at 11:35

1 Answers1

1

Had same issue. Upgrading pyserial to 2.5 solved the problem: exec built without additional "includes" contains pyserial.

szymond
  • 1,311
  • 2
  • 19
  • 41