This application failed to start because no Qt platform plugin could be initialized
-
@adsavi said in This application failed to start because no Qt platform plugin could be initialized:
What do you suggest to me?
What I already suggested: check the config.log file to see whether PRINTING support was activated or not. The failed checks are related to QtLocation module and do not have anything to do with printing...
-
@jsulm I installed QT again and now I did not have any problem with the installation and the installation log shows no problem.
There is not printing support issues but now the message I receive is this:
===========
QFactoryLoader::QFactoryLoader() checking directory path "/Users/adrianosavi/opt/anaconda3/plugins/platforms" ...
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"cocoa"
]
},
"className": "QCocoaIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("cocoa")
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqminimal.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqminimal.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"minimal"
]
},
"className": "QMinimalIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("minimal")
QFactoryLoader::QFactoryLoader() looking at "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqoffscreen.dylib"
Found metadata in lib /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqoffscreen.dylib, metadata=
{
"IID": "org.qt-project.Qt.QPA.QPlatformIntegrationFactoryInterface.5.3",
"MetaData": {
"Keys": [
"offscreen"
]
},
"className": "QOffscreenIntegrationPlugin",
"debug": false,
"version": 329991
}Got keys from plugin meta data ("offscreen")
QFactoryLoader::QFactoryLoader() checking directory path "/Users/adrianosavi/opt/anaconda3/bin/platforms" ...
Cannot load library /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib: (dlopen(/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/libQt5PrintSupport.5.dylib
Referenced from: /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib
Reason: image not found)
QLibraryPrivate::loadPlugin failed on "/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib" : "Cannot load library /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib: (dlopen(/Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib, 133): Library not loaded: @rpath/libQt5PrintSupport.5.dylib\n Referenced from: /Users/adrianosavi/opt/anaconda3/plugins/platforms/libqcocoa.dylib\n Reason: image not found)"
qt.qpa.plugin: Could not load the Qt platform plugin "cocoa" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.Available platform plugins are: cocoa, minimal, offscreen.
Abort trap: 6
=====
What is the next step you suggest?
-
-
@adsavi said in This application failed to start because no Qt platform plugin could be initialized:
installed today
How? Using online installer? Does it have libQt5PrintSupport.*.dylib?
libQt5PrintSupport.5.9.7.dylib - this is a different version -
@adsavi said in This application failed to start because no Qt platform plugin could be initialized:
there are no other dylib files beginning with libQt5PrintSupport
This is strange, it should be there.
Maybe somebody else knows, I'm not a Mac user. -
Hi,
There's something fishy here. It looks like your have installed Qt using conda. I suspect it came with PySide2. Is that the case ?
Now if you used the online installer, how are you running your application ? -
@SGaist yes I have installed Conda. I try uninstall it but no change. I run the application from visual studio code but if I run it from the terminal I got this message:
adrianosavi@ProOne Dashboard % python test.py
Traceback (most recent call last):
File "test.py", line 2, in <module>
from PySide2.QtWidgets import QApplication, QDialog, QLineEdit, QPushButton
ImportError: No module named PySide2.QtWidgets
adrianosavi@ProOne Dashboard % python test.py
Traceback (most recent call last):
File "test.py", line 2, in <module>
from PySide2 import QtWidgets #import QApplication, QDialog, QLineEdit, QPushButton
ImportError: No module named PySide2
adrianosavi@ProOne Dashboard % pip install PySide2
Requirement already satisfied: PySide2 in /Users/adrianosavi/opt/anaconda3/lib/python3.8/site-packages (5.15.1)
Requirement already satisfied: shiboken2==5.15.1 in /Users/adrianosavi/opt/anaconda3/lib/python3.8/site-packages (from PySide2) (5.15.1) -
Looks like you installed all your stuff in the base conda environment which is a bad idea.
I would recommend re-install conda cleanly and create a proper environment to install PySide2.