Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. No Qt platform plugin could be initialized
Forum Updated to NodeBB v4.3 + New Features

No Qt platform plugin could be initialized

Scheduled Pinned Locked Moved Unsolved Qt for Python
3 Posts 2 Posters 2.0k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    iamcreasy
    wrote on last edited by iamcreasy
    #1

    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 at https://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 in C:\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.

    JonBJ 1 Reply Last reply
    0
    • I iamcreasy

      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 at https://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 in C:\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.

      JonBJ Offline
      JonBJ Offline
      JonB
      wrote on last edited by JonB
      #2

      @iamcreasy
      If you Google for This 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:

      https://answers.microsoft.com/en-us/windows/forum/all/qt-platform-plugin-issue-what-is-this-is-it-self/aa351756-eb09-491c-aebc-9058ca69c0a4

      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 :(

      https://stackoverflow.com/questions/62368453/application-failed-to-start-because-no-qt-platform-plugin-could-be-initialized

      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.

      I 1 Reply Last reply
      1
      • JonBJ JonB

        @iamcreasy
        If you Google for This 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:

        https://answers.microsoft.com/en-us/windows/forum/all/qt-platform-plugin-issue-what-is-this-is-it-self/aa351756-eb09-491c-aebc-9058ca69c0a4

        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 :(

        https://stackoverflow.com/questions/62368453/application-failed-to-start-because-no-qt-platform-plugin-could-be-initialized

        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.

        I Offline
        I Offline
        iamcreasy
        wrote on last edited by
        #3

        @JonB It was much simpler for me to get ride of conda and switch to pip and venv.

        Perhaps, it was a conda issue.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved