PySide in Anaconda3

Matplotlib with QT4Agg may give error message

ImportError: No module named ‘PySide’

Fix

  1. install QT 5
    conda install pyqt
    
  2. add to matplotlibrc
    backend: qt5agg
    

Notes

Reference

Obsolete

I don’t recommend this fix anymore as it’s for old Python version ≤ 3.5.

python -m pip install pyside

This will take several minutes and may require the prerequisites:

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

Leave a Comment