0

I am trying to use cx_Freeze with a python3 programme I have written which uses Gtk. I ran cxfreeze-quickstart and then python setup.py build using the setup.py file created for me. However, I got this error: ImportError: No module named 'gi'.

This is my setup.py file:

from cx_Freeze import setup, Executable

buildOptions = dict(packages = [], excludes = [])

import sys
base = 'Win32GUI' if sys.platform=='win32' else None

executables = [
Executable('bio_gtk_programme.py', base=base)
]

setup(name='Bio Programme',
  version = '1.0',
  description = 'Bio Gtk',
  options = dict(build_exe = buildOptions),
  executables = executables)

Do I need to include 'gi' in packages = [] or add anything to the hooks.py file?

I've also tried this with py2exe on Windows, and I get the same ImportError...

Fliss
  • 45
  • 2
  • 11
  • Can you also provide the script you are freezing? It doesn't have to include everything. Usually just the imports are sufficient. – Anthony Tuininga Dec 10 '16 at 18:27
  • Okay, so this is the first few line of my programme, @AnthonyTuininga: `import gi` `gi.require_version("Gtk", "3.0")` `from gi.repository import Gtk, Pango` `from Bio import Entrez, SeqIO, Medline` `Entrez.email = "A.N.Other@example.com"` `from Bio.SeqUtils import GC` – Fliss Dec 11 '16 at 15:58

0 Answers0