0

I'm attempting to package a python application (Mnemosyne) using py2app (I didn't write the software; I am only attempting to package it).

I have built the application with py2app: sudo python setup.py py2app

and copied the qt_menu.nib directory into the Resources directory.

When I then attempt to launch the application: ./dist/Mnemosyne.app/Contents/MacOS/Mnemosyne

I get this error:

ImportError: No module named pyqt_ui.qt_translator

I haven't been able to figure out what to add to the "includes" to ensure qt_translator is included.

I read the list of PyQT modules but I couldn't find which module I need to include to get qt_translator. I learned that there is a QTranslator class in the QtCore module, but including PyQt4.QtCore doesn't help, nor does PyQt4*.

The line in the code that seems to be causing this is:

mnemosyne.components.insert(0,
                            ("mnemosyne.pyqt_ui.qt_translator",
                             "QtTranslator"))
Patrick Kenny
  • 4,515
  • 7
  • 47
  • 76
  • You need more information. Explain what your script imports. Tell us what classes you have already downloaded and installed/implemented. – gabeio Jun 16 '12 at 19:25
  • @CGeniusGo I added as much information as I could. Please let me know if this still isn't enough. – Patrick Kenny Jun 17 '12 at 00:33
  • Have you installed the [pyqt modules](http://www.riverbankcomputing.co.uk/software/pyqt/intro)? – gabeio Jun 17 '12 at 00:42

1 Answers1

1

The class you are missing is part of the package that you download when you download the Mnemosyne tarball it is in the folder mnemosyne/pyqt_ui file name qt_translator.py you need to extract the entire tarball and cd into it in terminal then use py2app.

gabeio
  • 1,282
  • 1
  • 23
  • 37