Pyside6 failed in python 3.11 embedded version
-
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem. Available platform plugins are: direct2d, minimal, offscreen, windows
@The-mr-wy If you have problem with Qt plug-ins then set QT_DEBUG_PLUGINS env variable and analyse the application output.
See https://doc.qt.io/qt-6/debug.html for details. -
fail logs:qt.core.plugin.factoryloader: Got keys from plugin meta data QList("windows")
qt.core.plugin.factoryloader: checking directory path "C:/Temp/gui_hello/platforms" ...
qt.core.library: "C:/Temp/gui_hello/_internal/PySide6/plugins/platforms/qwindows.dll" cannot load: Cannot load library C:\Temp\gui_hello_internal\PySide6\plugins\platforms\qwindows.dll: The specified procedure could not be found.
qt.core.plugin.loader: QLibraryPrivate::loadPlugin failed on "C:/Temp/gui_hello/_internal/PySide6/plugins/platforms/qwindows.dll" : "Cannot load library C:\Temp\gui_hello\_internal\PySide6\plugins\platforms\qwindows.dll: The specified procedure could not be found."
-
Hi,
Which exact version of Windows are on ?
Which version of PySide6 are you using ?
How did you install it ? -
Windows Version:Win10 Pro;
Pyside6 version:6.9.1
Python File:python-3.11.9-embed-amd64(downloaded from python website,and use pip to install Pyside6)
Python Script:import sys
from PySide6.QtWidgets import (
QApplication,
QMainWindow,
QPushButton,
QMessageBox
)
class MainWindow(QMainWindow):
def init(self):
super().init()
self.setWindowTitle("PySide6 ")
self.setGeometry(100, 100, 300, 200)
button = QPushButton("Hello", self)
button.setGeometry(100, 80, 100, 30)
button.clicked.connect(self.show_message)
def show_message(self):
QMessageBox.information(self, "OK", "OK,PySide6!")
if name == "main":
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec()) -
Windows Version:Win10 Pro;
Pyside6 version:6.9.1
Python File:python-3.11.9-embed-amd64(downloaded from python website,and use pip to install Pyside6)
Python Script:import sys
from PySide6.QtWidgets import (
QApplication,
QMainWindow,
QPushButton,
QMessageBox
)
class MainWindow(QMainWindow):
def init(self):
super().init()
self.setWindowTitle("PySide6 ")
self.setGeometry(100, 100, 300, 200)
button = QPushButton("Hello", self)
button.setGeometry(100, 80, 100, 30)
button.clicked.connect(self.show_message)
def show_message(self):
QMessageBox.information(self, "OK", "OK,PySide6!")
if name == "main":
app = QApplication(sys.argv)
window = MainWindow()
window.show()
sys.exit(app.exec())@The-mr-wy
Especially for Python code please enclose any code blocks in```
before & after, as per the</>
button when you are composing a message. At present anyone copying your code, if they wish to test it, will simply not have legal Python.Having said that, in your case I don't think any code is relevant. Whatever your problem is it is to do with the way Qt has been installed or what versions of DLLs are being picked up or not at runtime.
FWIW, usually
The specified procedure could not be found
indicates that the DLL file itself was found but its content did not match what the caller expected, i.e. it is at the wrong version. I would not guarantee this, but it is hinted at.