I am trying to package a program I wrote (using Pyqt4) into a single executable for linux. I tried using Pyinstaller however it has problems with importing Gio (for settings)
from gi.repository import Gio
Running the application would give:
ImportError: cannot import name Gio
I then tried to use bbFreeze. The problem here is that after compiling and running the application, I get this error message:
TypeError: GObject.__init__() takes exactly 0 arguments (1 given)
For bbFreeze this is my script I am running to compile the code:
#!/usr/bin/env python
from bbfreeze import Freezer
includes = ["gio"]
excludes = []
bbFreeze_Class = Freezer('dist', includes=includes, excludes=excludes)
bbFreeze_Class.addScript("main.py", gui_only=True)
bbFreeze_Class.use_compression = 0
bbFreeze_Class.include_py = True
bbFreeze_Class()
I am using Ubuntu 11.10 and Python 2.7. If someone can help that would be great. This is my first time writing Python and trying to compile it (so I am not sure if there are better alternatives).