Uploaded image for project: 'Qt for Python'
  1. Qt for Python
  2. PYSIDE-2405

Python from Windows Store doesn't work with PySide

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3: Somewhat important
    • 6.6.0
    • 6.5.2
    • PySide
    • None
    • Windows 11, python 3.11.4 from the windows store
    • Windows
    • 078fb526b (dev), a0271981c (6.5)

    Description

      Hi, I'm new to Qt and only worked for like some (painful) hours on it.

      TLDR: DON'T use the current Windows Store Version!

       

      My tale of woe:

      I personally think that it's always a good idea to look for examples how something works. So I used this demo: https://doc.qt.io/qtforpython-6/tutorials/qmlapp/qmlapplication.html

      I already had a python 3.10.11 on my computer, created a virtual environment and installed pyside6 >= 6.5.1.1 via a requiremtns.txt (Installed PySide6==6.5.2; PySide6-Addons==6.5.2; PySide6-Essentials==6.5.2)

      The Demo didn't run, and always produces the following error:

      [file:///C:/Shared/<user>/qt/view.qml:1:1: module "QtQuick" version 6.0 cannot be imported because:
      module "QtQml" version 6.0 cannot be imported because:
      Cannot load library C:\Shared\<user>\venv3\Lib\site-packages\PySide6\qml\QtQml\WorkerScript\workerscriptplugin.dll: Das angegebene Modul wurde nicht gefunden.]

       

      From another source I copied this code:
      app = QApplication(sys.argv)
      window = MainWindow()
      window.show()
      app.exec()
      ... runs without a problem.

       

      So I searched and found the following bug report from 2020:

      https://bugreports.qt.io/browse/PYSIDE-1245?focusedCommentId=527588&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-527588

      There it says that the python.org version works, the Microsoft Store not.

       

      Today after some other work I tried the solution and qt runs!

      So now I have three venvs (virtual environment):

      1. python 3.10.11 (Windows Store) ------ error
      2. python 3.11.4 (Windows Store) ------ error
      3. python 3.11.4 (python.org) ------ works

      In every venv I only installed the pyside 6 (via a requirements.txt)

      So unless I overlook something stupid, it should be the Windows Store version.

      For context: I use pycharm and created my venvs with the gui

       

      Hope that anyone sees this bug report, without wasting hours in a new Framework....
       

      Attachments

        1. main2.py
          2 kB
        2. ui_main.py
          3 kB
        3. view.qml
          1 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            crmaurei Cristian Maureira-Fredes
            bholzbach Benedikt Holzbach
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes