Previously, you had to write setup.py, such as py2exe and CX_Freeze. Recently, it seems that PyInstaller is recommended, so I tried it.
pip install pyinstaller
C:\Users\kounoike\Documents\python\installer-test>type hello.py
#!python
# coding: utf-8
print "hello world"
C:\Users\kounoike\Documents\python\installer-test>python hello.py
hello world
pyinstaller hello.py
only this. No troublesome setup.py description. Hello.exe and necessary libraries are created under dist \ hello.
It seems that it takes in too many packages compared to py2exe etc.
#!python
# coding: utf-8
import matplotlib.pyplot as plt
print "hello world"
Just by rewriting, dist and below will swell to 100MB. If you look at it, you can see that IPython, QT4, OpenGL, and other extra things are mixed in.
So let's use virtualenv. Please refer to http://qiita.com/kounoike/items/14bfd7c328be0d69c770 etc.
There is one caveat when using PyInstaller with virtualenv. Let's install pywin32 with easy_install.
After all, if you put it in the Japanese folder, it will not work well ...
Why is it okay with a network drive?
Recommended Posts