I am converting my wxpython (3.0.2.0) application to binaries using PyInstaller. The binaries work fine when built and executed on Ubuntu 12.04. However if I build on Ubuntu
Fundamentally the problem is with the PyInstaller version - you need to be on the develop
version. This issue has been seen and is documented on a PyInstaller Github issue.
To install the latest version and rectify - at the command prompt type:
$ pip install git+https://github.com/pyinstaller/pyinstaller
This directly installs the latest version of pyinstaller from github (this branch on github. Until recently, PyInstaller had a separate python3
branch, but this has been merged back into the develop branch. If you need to use Python 3.x, you will need this branch - get this by appending @develop
to the pip install
command)
The above method relies on you having git
installed on your system to get the pyinstaller code (pretty likely for a developer these days, I guess). If not, you can either
apt-get install git
(you might need to sudo
that)Personally - I much prefer option 1 as you avoid all the potential problems of building from a zipped source tree yourself.
I tested this on Ubuntu 14.04, 64 bit, wxpython 3.0.2.0 with python 2.7.6, using the simple "Hello world" app from the wxPython webpage. The OP's issue reproduced exactly before installing pyinstaller develop version. After installing the develop version the app built correctly and ran as an executable.
Documentation of using pip with git - https://pip.pypa.io/en/latest/reference/pip_install.html#git
It is not clear from your question which versions of PyInstaller you are using on your Ubuntu 12.04 install vs the 14.04 version. It seems that the version you have on 12.04 does not exhibit the same issue as the standard version installed on 14.04.