No Qt platform plugin could be initialized
-
I am trying to get started with Qt For Python / PySide. I just installed PySide using
pip install pyside6
, and tried to run the code posted athttps://doc.qt.io/qtforpython/quickstart.html
on PyCharm.When I run the program I see the following error dialog box that says,
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fixe this problem
I've tried solving the problem by uninstalling PySide using
pip uninstall pyside6
, and reinstalling - but it didn't make any difference.I tried googling, and search in the Qt forum for existing solutions. For example, I've made sure
qwindows.dll
file is present inC:\Users\iamcr\anaconda3\envs\py38\Lib\site-packages\PySide6\plugins\platforms
. I also do not have any Latex installation on my system.Some help would be appreciated. Thanks! Please let me know if you need any more information to diagnose this problem. I am using conda to manage my environment, and I am on Windows 10.
-
@iamcreasy
If you Google forThis application failed to start because no Qt platform plugin could be initialized
you will find many possible issues.At a glance either of the following might help:
My experience wasn't exactly like yours, Meghan, but it may give you a start. I am working in Python in the PyCharm IDE. By default PyCharm 2018.1 gives you a project with a virtual environment (q.v.). The setup didn't copy the missing file to the venv; I solved it by switching to the global interpreter: File/Settings/Project:<name>/Project Interpreter. In the drop-down selection at the top, select the interpreter that is not in the venv. This removes much of the protection of the virtual environment, but that doesn't matter to a patzer like me. Hope this helps somewhat.
Unfortunately this reply did not seem to say which files the poster copied :(
Try to copy these files and folders beside Your EXE file:
...There are further articles to try reading. It is likely a conda environment issue.
If all else fails try setting environment variable
QT_DEBUG_PLUGINS=1
before running your Python application, and look at the end of the diagnostic output.