Today I found that some of my plotly functions were not working, and re-loading the pyxll files returned the message “could not import PySide6.Qtgui pyside6”. Searching for this problem I found:
After upgrading PySide6 gives error No module named ‘PySide6.QtWidgets’
In particular, the following procedure fixed the problem for me:
Solution :
$ python3.10 -m pip uninstall pyside6 pyside6-addons pyside6-essentials shiboken6 $ python3.10 -m pip cache purge $ python3.10 -m pip install pyside6It is necessary to clear
cachefiles before reinstallingpyside6other wise it will use previous cache files and theimport errorusing continue to come.
But note that a following comment says that uninstalling and clearing the cache is not necessary.
$ python3.10 -m pip install --force-reinstall --no-cache-dir pyside6No need to
pip uninstallandpip cache clear