skip to Main Content

I have problem that everything works perfectly in Visual Studio Code, but in QT Quick im still getting an error:

Traceback (most recent call last):
  File "D:pythonqtkurs1main.py", line 5, in <module>
    from PySide6.QtGui import QGuiApplication
ModuleNotFoundError: No module named 'PySide6'

What can be caused of this error? How to fix it?

2

Answers


  1. Is it possible that the module PySide6 is not appended to the sys path? Or is the module in the folder the main.py it is getting launched? Try to use

    sys.path.append('/path/to/application/app/folder')
    

    to be sure that module will be reachable at right time.
    That should solve your issue in my opinion. (as you mentioned in the comment that module is already installed for your python –> pip install module)

    Login or Signup to reply.
  2. To use a module, first, you need to download it. In this case before running the codes, you need to install PySide6 module via CMD. Just open CMD then run this line "pip install PySide6". It will solve your problem.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search