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

Reg->6.8.2: Windows: MSVC runtime no longer bundled/Importing fails with "Unable to import Shiboken from {empty path}, {more paths}"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P2: Important
    • 6.9.0, 6.8.3
    • 6.8.2
    • Shiboken
    • None
    • Windows
    • 8af842477 (dev), 7821dc2e9 (6.8), e53928f28 (6.8.2), 092e783a5 (tqtc/6.8.2), 3ad9df727 (tqtc/lts-6.5)

    Description

      Since upgrading from 6.8.1.1 to 6.8.2, PySide6 fails to work on a GitLab CI machine. Linux still works the same. I tried the two versions back and forth - 6.8.1.1 works, 6.8.2 fails, on the same machine, using the same image (mcr.microsoft.com/windows/server:ltsc2022).

      Interestingly, pyinstaller works, and running tests using pytest bundled in the executable works, too. So it does not seem like the OS is missing dependencies in particular.

      Using docker image sha256:16f97fcf444087ca9ebac8ee15ced4d1ef1e4c34dc153eddc34bd38f19c02ce2 for mcr.microsoft.com/windows/server:ltsc2022 with digest mcr.microsoft.com/windows/server@sha256:15bb094bfbb1969915096cc05ef0cebfccaa84bedf1893cdd3cd2a4876680336 ...
      

       
      I could reduce the problem to this:

      6.8.1.1:

      $ python -c "from PySide6.QtWidgets import QApplication; QApplication()"
      Invalid code page
      $ pyright
      ...
      

      6.8.2 - note how "Unable to import Shiboken from ..." seems to be using an empty first path (which seems to be normal: https://stackoverflow.com/a/49559060/880783)

      $ python -c "from PySide6.QtWidgets import QApplication; QApplication()"
      Invalid code page
      PySide6/__init__.py: Unable to import Shiboken from , C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1\python313.zip, C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1\DLLs, C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1\Lib, C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1, C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1\Lib\site-packages
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
          from PySide6.QtWidgets import QApplication; QApplication()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1\Lib\site-packages\PySide6\__init__.py", line 140, in <module>
          _setupQtDirectories()
          ~~~~~~~~~~~~~~~~~~~^^
        File "C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1\Lib\site-packages\PySide6\__init__.py", line 66, in _setupQtDirectories
          from shiboken6 import Shiboken
        File "C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1\Lib\site-packages\shiboken6\__init__.py", line 27, in <module>
          from shiboken6.Shiboken import *
      ImportError: DLL load failed while importing Shiboken: The specified module could not be found.
      

      The changelogs do not really reveal anything to me:

      • PySide6 - Qt for Python
      • Shiboken6 - Qt for Python
         
        The pipeline is private, so I cannot share access or even a full log, but I will be happy to run commands for debugging. (Unfortunately, GitLab Windows Container CI does not allow remoting into the session as it does for Linux-based ones...)

      And yes, shiboken6 is installed:

      $ uv pip install -e .[lint,type,ci]
      Invalid code page
      Using Python 3.13.1 environment at: C:\Users\ContainerAdministrator\.pyenv\pyenv-win\versions\3.13.1
      Resolved 76 packages in 15.58s
      Prepared 74 packages in 20.02s
      Installed 75 packages in 9.00s
       + astroid==3.3.8
       + bandit==1.8.2
       + certifi==2025.1.31
       + charset-normalizer==3.4.1
       + colorama==0.4.6
       + colorcet==3.1.0
       + contourpy==1.3.1
       + coverage==7.6.10
       + cycler==0.12.1
       + decorator==5.1.1
       + dill==0.3.9
       + flake8==7.1.1
       + fonttools==4.55.8
       + funcy==2.0
       + humanize==4.11.0
       + idna==3.10
       + iniconfig==2.0.0
       + isort==6.0.0
       + kiwisolver==1.4.8
       + markdown-it-py==3.0.0
       + matplotlib==3.10.0
       + mccabe==0.7.0
       + mdurl==0.1.2
       + mypy==1.14.1
       + mypy-extensions==1.0.0
       + nodeenv==1.9.1
       + nodejs-wheel-binaries==22.13.1
       + numpy==2.2.2
       + packaging==24.2
       + pandas==2.2.3
       + pbr==6.1.0
       + pillow==11.1.0
       + platformdirs==4.3.6
       + pluggy==1.5.0
       + psutil==6.1.1
       + pyarrow==19.0.0
       + pycodestyle==2.12.1
       + pydicom==3.0.1
       + pydocstyle==6.3.0
       + pyflakes==3.2.0
       + pygments==2.19.1
       + pylama==8.4.1
       + pylint==3.3.4
       + pyparsing==3.2.1
       + pyqtgraph==0.13.7
       + pyright==1.1.393
       + pyside6-essentials==6.8.2
       + pytest==8.3.4
       + pytest-cov==6.0.0
       + pytest-order==1.3.0
       + pytest-qt==4.4.0
       + python-dateutil==2.9.0.post0
       + python-gitlab==5.6.0
       + pytz==2025.1
       + pyyaml==6.0.2
       + requests==2.32.3
       + requests-toolbelt==1.0.0
       + rich==13.9.4
       + ruff==0.9.4
       + setuptools==75.8.0
       + shiboken6==6.8.2
       + six==1.17.0
       + snowballstemmer==2.2.0
       + stevedore==5.4.0
       + toml==0.10.2
       + tomlkit==0.13.2
       + typeguard==4.4.1
       + types-decorator==5.1.8.20250121
       + types-psutil==6.1.0.20241221
       + types-pyinstaller==6.11.0.20250130
       + typing-extensions==4.12.2
       + tzdata==2025.1
       + urllib3==2.3.0
      

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              kleint Friedemann Kleint
              bers bers bers
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: