Reputation: 73
I'm trying to create a distribution folder 'freeze' (currently for windows, later for other OS's) for my python program. at first I used py2exe and later PyInstaller. I only use a few functions from Scipy:
from scipy.misc import imread
from scipy.linalg import norm
from scipy import sum, average
My final distribution folder looks like this:
Overall the folder size is almost 200MB and my program isn't all that. I need a way to either replace 'numpy' and 'scipy' with other "leaner" packages, or preferably tweak with the "freezer" program to make it include as little as possible.
p.s. single file distribution is roughly 50MB, which is also too large for me.
Thanks
Upvotes: 1
Views: 862
Reputation: 280
Sometimes pyinstaller includes "optional" imports that are not always necessary. You can try to exclude some of the large Numpy libs, e.g. via --exclude-module
from the command line. You will then have to test thoroughly that your program still works.
Upvotes: 1