python - cx_freeze & pygobject in a subdirectory -
I have a small program that uses py27 & amp; PyGTK. I can stop it with Cx_Freeze very gladly.
I'm trying to "port" it and it's py33 & amp; Pygobject It has been completed successfully and I am not trying to adopt our setup.py cx_freeze script to "freeze" my setup now.
I can freeze a test application, but when I try to use the Tweaked version I get an ImportError. Whatever I have done, I have made all the binary data in a subdirectory (bin) The root has tried to keep the bit uncluttered.
As it has been mentioned that py27 & amp; Pygtk.
I have compressed it into a simple pipe and setup to display it:
TEST.py
###### ################################################## ############### Import OS Import System If Gateter (System, 'Frozen', Falls): # crop friction script wrapping sys.path.append (os.path.join (Os) .path.dirname (sys.executable), 'bin') sys.path.append (os.path.join (os.path.dirname (sys.executable), 'bin \\ etc') sys.path .append (Os.path.join (os.path.dirname (sys.executable), 'bin \\ lib')) sys.path.append (os.path.join (os.path.dirname (sys.executable), ' Bin \\ Shared ')) sys.path.append (os.path.join (os.path.dirname (sys.executable),' bin \\ library.zip ') os.environ [' TCL_LI BRARY '] = Os.path.join (os.path.dirname (sys.executable),' bin \\ tcl ') os.environ [' TK_LIBRARY '] = os.path.join (OS path.dirname (sys) .executable), 'bin \\ tk') os.environment ['MATPLOTLIBDATA'] = os.path.join (os.path.dirname (sys.executable), 'bin \\ mpl-data') GI import gi. Gi.repositor y import gtk from repository import ####################################### ###########################
setup.py
Now when I run: / c / Python33 / python -OO setup.py build and then dist / tes Execute t.exe I have printed the console:
Error: Route: No typelist found for GTK traceback (most recent call final): The file "c: \ Python33 \ lib \ site- Packages \ cx_frreeze \ initscripts \ Console3.py ", line 27, exec (code, m. dict ) Import file "test.py", in line 19, in import: name can not import Gtk
I checked and typed files, but any Due to the Python & amp; I can not find them, I thought that this could be a missing path for gearpiece, but he did not do it right. Any ideas?
os.environment ['GI_TYPELIB_PATH'] = os.path.join (Os.path .dirname (sys.executable), 'bin \\ lib \ girepository-1.0')
Comments
Post a Comment