Based on that error and what you've already tried, the root cause is likely that the PySide6 module isn’t installed in the Python environment you're actually running your script with. This is a classic issue, especially on macOS, where you can have multiple Python versions installed (system Python, Homebrew Python, PyCharm’s venv, etc.).
I suggest you start by verifying which Python version is installed on your Mac. You can do so, by running this command in the Terminal: which python3, and then: python3 --version
For example, my 2023 M2 Pro Mac mini, which is running macOS Sequoia 15.4.1, has Python v3.9.6 installed. Note: PySide6 is only compatible with Python 3.6+, but Python 3.13 is very new and some packages might not be updated yet. If you’re on the bleeding edge (like 3.13.3), it's possible PySide6 doesn’t have full support yet. Consider testing with Python 3.11 or 3.12 to be safe.so what you are trying to use is an extremely new version.
Confirm that it’s actually the Python 3.13.3 install you’re expecting. If it's not, you might be running a different one (like /usr/bin/python3 or a Homebrew one).
Next, confirm that PySide6 is installed in that environment: python3 -m pip list | grep PySide6
If nothing comes back, then it's not installed for that Python environment, and you will need to install it.
If you're using PyCharm, make sure it's also using the same interpreter (check: PyCharm Preferences → Project: → Python Interpreter).
Finally, pip and Python versions must match exactly. Sometimes you need to do python3.13 -m pip install PySide6 if python3 still points to an older version.