conda-forge / miniforge

A conda-forge distribution.
https://conda-forge.org/miniforge
Other
6k stars 317 forks source link

Qt application builds/installs fine, but fails to launch, due to "incompatible Qt library". #396

Closed capn-freako closed 1 year ago

capn-freako commented 1 year ago

Comment:

I'm building a Qt application on a new M2 MacBook for the first time. The build/installation appear to go just fine, but when I attempt to launch the app. I get:

(pybert-tst) dbanas@Davids-Air ~ % pybert
qt.core.plugin.loader: In /Users/dbanas/miniforge3/envs/pybert-tst/plugins/platforms/libqwebgl.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /Users/dbanas/miniforge3/envs/pybert-tst/plugins/platforms/libqoffscreen.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /Users/dbanas/miniforge3/envs/pybert-tst/plugins/platforms/libqminimal.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.core.plugin.loader: In /Users/dbanas/miniforge3/envs/pybert-tst/plugins/platforms/libqcocoa.dylib:
  Plugin uses incompatible Qt library (5.15.0) [release]
qt.qpa.plugin: Could not find the Qt platform plugin "cocoa" in ""
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

zsh: abort      pybert

Here is everything Qt-related that got installed into my test environment:

(pybert-tst) dbanas@Davids-Air ~ % conda list qt
# packages in environment at /Users/dbanas/miniforge3/envs/pybert-tst:
#
# Name                    Version                   Build  Channel
pyqt                      5.15.4           py39h5be3558_1    conda-forge
pyqt5-sip                 12.9.0           py39h6e3512e_1    conda-forge
qt-main                   5.15.3               haf604a7_0    conda-forge
qt6-main                  6.4.0                h4be6a9e_3    conda-forge

Any thoughts on how to debug this?

hmaarrfk commented 1 year ago

Please uninstall qt6-main. We are still experimenting with it.

I think some qtpy detection is buggy with both installed.

capn-freako commented 1 year ago

That worked! Thanks, Mark. :) -db

On Dec 25, 2022, at 8:37 PM, Mark Harfouche @.***> wrote:

Please uninstall qt6-main. We are still experimenting with it.

I think some qtpy detection is buggy with both installed.

— Reply to this email directly, view it on GitHub https://github.com/conda-forge/miniforge/issues/396#issuecomment-1364878969, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAH7XGX2VFIWTKEUBLB2ZVTWPEOKFANCNFSM6AAAAAATJJ5YBU. You are receiving this because you authored the thread.

hmaarrfk commented 1 year ago

yeah... i hit that bug a while back.

I think you can solve by specifying the environment variable QT_API but there are some package, like opencv, that will pull in Qt5 regardless (I think)