Search code examples
pythonpippyside6

After updating pyside6 to 6.5.2 I can't run anything with it


I recently updated my pyside6 with pip from 6.5.1.1 to 6.5.2 but whenever I try to run a program that I used pyside I get

Traceback (most recent call last):
  File "c:\Users\Admin\Python projects\test.py", line 1, in <module>
    from PySide6.QtWidgets import *
  File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\PySide6\__init__.py", line 124, in <module>
    _setupQtDirectories()
  File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\PySide6\__init__.py", line 58, in _setupQtDirectories        
    for dir in _additional_dll_directories(pyside_package_dir):
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\Admin\AppData\Roaming\Python\Python311\site-packages\PySide6\__init__.py", line 27, in _additional_dll_directories
    raise ImportError(str(shiboken6) + ' does not exist')
ImportError: C:\Users\Admin\AppData\Roaming\Python\Python311\shiboken6\libshiboken does not exist

for example my code there was just importing the Widgets with

from PySide6.QtWidgets import *

Solution

  • As @musicamante said, I just had to remove and install again:

    1. Uninstall the package
    2. Remove cache files from C:\Users\%USERNAME%\AppData\Local\pip\Cache
    3. Install it again