I am trying to use cx-freeze to create a static self-contained distribution of my app (The Spye Python Engine, www.spye.dk), however, when I run cx-freeze, it says:
Missing modules aren't necessarily a problem: a lot of modules try different imports to accommodate different platforms or different versions of Python. In subprocess
, for example, you can find this code:
if mswindows:
...
import _subprocess
cx_Freeze doesn't know about this, so it will try to find _subprocess
on Linux/Mac as well, and report it as missing. Specifying them in includes
doesn't change anything, because it's trying to include them, but unable to find them.
It should build a file anyway, so try running that and seeing if it works.
I guess, you can not simply +=
on lists.
You should probably use the list method extend
- otherwise the original list will not be modified:
includes.extend(["BaseHTTPServer", "<rest of your modules>"])
EDIT: (Thank @ThomasK)
+=
works fine - I only had an online Python interpreter that did not work correctly. (I have no python install on my Windows installation so I had to check online).