py2exe converts Python scripts into executable Windows programs. However, it leads to an error when scripts import "numpy".
python2exe.py is using py2exe with "numpy problem" fixed and records the timestamp of building.
git clone https://github.com/ktyeh/python2exe.git
-
target.py: name of the main Python script
-
dirname: name of directory, defaultly set as same as target
-
source: path of target.py, defaultly set as current directory
-
destination: output path, defaultly set as current directory
cd python2exe
python python2exe.py -t test.py -D DIRNAME -s source -d dist
And test.exe would be in ./dist/DIRNAME
Run ./dist/DIRNAME/test.exe