Search code examples
pythonwindowspyside6

ModuleNotFoundError: No module named 'PySide6' on Windows


Windows.

I try to use qt for python I found instruction: https://doc.qt.io/qtforpython-6/quickstart.html I installed python 3.11 for windows, run pip install pyside6 with success.

But when i try this code: import PySide6.QtCore I got this error message: ModuleNotFoundError: No module named 'PySide6' Why python not see installed modules?

I try import PySide6.QtCore from python console and from IDLE with same result

I check PYTHONPATH and PYTHONHOME env variables, it correct


Solution

  • I would generally prefer to uninstall pyside6 again with the following command:

    pip uninstall pyside6
    

    And then i would go with the essentials from pyside6:

    pip install pyside6-essentials