PySide in Anaconda3

When using Matplotlib in Anaconda 3, and if you’re trying to use QT4Agg, you may get the error message

ImportError: No module named ‘PySide’

try

conda install pyqt

and put in your matplotlibrc

backend: qt5agg

alternate fix using PySide

pip install pyside

This will take several minutes and may require the prerequisites:

apt install libxext-dev python-qt4 qt4-dev-tools build-essential

Reference

Leave a Comment