[MacPorts] #70488: frescobaldi2 @2.20.0: Launch error: ModuleNotFoundError: No module named 'PyQt4' (was: Frescobaldi2 @2.20.0: Frescobaldi LAUNCH ERROR after installation on legacy iMac OSX 10.11.6 (El Capitan))

MacPorts noreply at macports.org
Sun Aug 4 20:22:14 UTC 2024


#70488: frescobaldi2 @2.20.0: Launch error: ModuleNotFoundError: No module named
'PyQt4'
---------------------------+-----------------------
  Reporter:  coffeyjj      |      Owner:  dliessi
      Type:  defect        |     Status:  assigned
  Priority:  Normal        |  Milestone:
 Component:  ports         |    Version:  2.9.3
Resolution:                |   Keywords:  elcapitan
      Port:  frescobaldi2  |
---------------------------+-----------------------
Changes (by ryandesign):

 * status:  new => assigned
 * keywords:   => elcapitan
 * owner:  (none) => dliessi
 * port:  Frescobaldi2 => frescobaldi2


Old description:

> Computer: Apple iMac7,1 *OS: OSX 10.11.6 (El Capitan)* Xcode: 8.2.1
> (compatible with El Capitan)
>
> port install Frescobaldi2 completed with no errors,
> BUT terminal output for the launch attempt indicates the Frescobaldi app
> fails to launch due to a missing module:
>
> ModuleNotFoundError: No module named 'PyQt4'
>
> Terminal output for Frescobaldi2 launch attempt:
>
> {{{
> iMac:~ Admin$
> /Applications/MacPorts/Frescobaldi.app/Contents/MacOS/Frescobaldi
> Traceback (most recent call last):
>   File
> "/Applications/MacPorts/Frescobaldi.app/Contents/Resources/__boot__.py",
> line 489, in <module>
>     _run()
>   File
> "/Applications/MacPorts/Frescobaldi.app/Contents/Resources/__boot__.py",
> line 483, in _run
>     exec(compile(source, script, "exec"), globals(), globals())
>   File "/opt/local/bin/frescobaldi", line 7, in <module>
>     import main
>   File
> "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7
> /site-packages/frescobaldi_app/main.py", line 34, in <module>
>     from PyQt4.QtCore import QSettings, QTimer, QUrl
> ModuleNotFoundError: No module named 'PyQt4'
> 2024-08-04 10:47:09.800 Frescobaldi[14897:1303533] Launch error
> 2024-08-04 10:47:09.801 Frescobaldi[14897:1303533] Launch error
> See the py2app website for debugging launch issues
> }}}
>
> FULL terminal output IS ATTACHED for BOTH Frescobaldi2 port installation
> AND Frescobaldi app launch attempt.
>

> NOTE:
>
> The Py2App website provides NO USEFUL HELP for debugging this launch
> issue; just some cryptic text intended for people who do this every day
> and ALREADY know what to do.
>
> For example, on the Py2App page "Debugging application
> building"(https://py2app.readthedocs.io/en/latest/debugging.html), only
> this cryptic text below is offered with NO INDICATION at all PRECISELY
> HOW one is supposed to actually use the suggested context-free, example-
> free, effectiveness-free suggestion to "use --includes or --packages" to
> "add the missing module to the application."
>
> {{{
> Some common problems are:
>
> An import statement fails due to a missing module or package
>
> This generally happens when the dependency cannot be found by the source
> code analyzer, either due to dynamic imports (using __import__() or
> importlib to load a module), or due to imports in a C extension.
>
> In both cases use --includes or --packages to add the missing module to
> the application.
>
> If this is needed for a project on PyPI: Please file a bug on GitHub,
> that way we can teach py2app to do the right thing.
> }}}
>
> I have absolutely NO IDEA what a Py2App "import statement" is, or
> precisely what Py2App is trying (in its maximally ineffective manner) to
> tell me to do here in order to resolve my Frescobaldi launch failure.
> None.
>
> Nor does any of this, as far as I know, have anything to do with "a
> project on PyPI," whatever that is, so the clear implication of the
> Py2App text above is that I'm definitely NOT to file a bug on Py2App's
> Github site since none of this is needed for a PyPI project, whatever
> that is.
>
> I could find absolutely nothing on the Py2App website that would help me
> resolve this Frescobaldi port launch issue.
>
> Help please.

New description:

 Computer: Apple iMac7,1 *OS: OSX 10.11.6 (El Capitan)* Xcode: 8.2.1
 (compatible with El Capitan)

 `port install Frescobaldi2` completed with no errors,
 BUT terminal output for the launch attempt indicates the Frescobaldi app
 fails to launch due to a missing module:

 {{{
 ModuleNotFoundError: No module named 'PyQt4'
 }}}

 Terminal output for Frescobaldi2 launch attempt:

 {{{
 iMac:~ Admin$
 /Applications/MacPorts/Frescobaldi.app/Contents/MacOS/Frescobaldi
 Traceback (most recent call last):
   File
 "/Applications/MacPorts/Frescobaldi.app/Contents/Resources/__boot__.py",
 line 489, in <module>
     _run()
   File
 "/Applications/MacPorts/Frescobaldi.app/Contents/Resources/__boot__.py",
 line 483, in _run
     exec(compile(source, script, "exec"), globals(), globals())
   File "/opt/local/bin/frescobaldi", line 7, in <module>
     import main
   File
 "/opt/local/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7
 /site-packages/frescobaldi_app/main.py", line 34, in <module>
     from PyQt4.QtCore import QSettings, QTimer, QUrl
 ModuleNotFoundError: No module named 'PyQt4'
 2024-08-04 10:47:09.800 Frescobaldi[14897:1303533] Launch error
 2024-08-04 10:47:09.801 Frescobaldi[14897:1303533] Launch error
 See the py2app website for debugging launch issues
 }}}

 FULL terminal output IS ATTACHED for BOTH Frescobaldi2 port installation
 AND Frescobaldi app launch attempt.


 NOTE:

 The Py2App website provides NO USEFUL HELP for debugging this launch
 issue; just some cryptic text intended for people who do this every day
 and ALREADY know what to do.

 For example, on the Py2App page "Debugging application
 building"(https://py2app.readthedocs.io/en/latest/debugging.html), only
 this cryptic text below is offered with NO INDICATION at all PRECISELY HOW
 one is supposed to actually use the suggested context-free, example-free,
 effectiveness-free suggestion to "use --includes or --packages" to "add
 the missing module to the application."

 {{{
 Some common problems are:

 An import statement fails due to a missing module or package

 This generally happens when the dependency cannot be found by the source
 code analyzer, either due to dynamic imports (using __import__() or
 importlib to load a module), or due to imports in a C extension.

 In both cases use --includes or --packages to add the missing module to
 the application.

 If this is needed for a project on PyPI: Please file a bug on GitHub, that
 way we can teach py2app to do the right thing.
 }}}

 I have absolutely NO IDEA what a Py2App "import statement" is, or
 precisely what Py2App is trying (in its maximally ineffective manner) to
 tell me to do here in order to resolve my Frescobaldi launch failure.
 None.

 Nor does any of this, as far as I know, have anything to do with "a
 project on PyPI," whatever that is, so the clear implication of the Py2App
 text above is that I'm definitely NOT to file a bug on Py2App's Github
 site since none of this is needed for a PyPI project, whatever that is.

 I could find absolutely nothing on the Py2App website that would help me
 resolve this Frescobaldi port launch issue.

 Help please.

--

Comment:

 For me, on macOS 12, the app launches, but the Music View on the right of
 the main window displays only the message "Could not load the
 [https://github.com/frescobaldi/python-poppler-qt4 popplerqt4] module."

-- 
Ticket URL: <https://trac.macports.org/ticket/70488#comment:1>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list