*** Update *** This issue was solved by whiteroom in the comments section. The issue was that the Python Interpreter setting needed to be changed to point to the correct one. The whiteroom question answer was also very helpful.
*** Original Question *** I installed PySide6 on my MacBook and confirmed that it is installed as shown in the attached screen shot. I'm also very new to Python and using the Mac Terminal app.
pip3 install PySide6
I tried to run this simple app from the Visual Studio Code editor.
from PySide6.QtWidgets import QApplication,QLabel
app = QApplication([])
label = QLabel('hello world')
label.show()
app.exec()
Python responded with this error:
Traceback (most recent call last):
File "/Users/emad-ud-deen/Development/Python/Practice/PySide6 Test.py", line 1, in <module>
from PySide6.QtWidgets import QApplication,QLabel
ModuleNotFoundError: No module named 'PySide6'
The only way I'm able to run the apps I write with PySide6 without that error is from the command line in Terminal.
Can you tell me how to get Visual Studio Code to recognise PySide6?