Import errors doing graphics (e.g. matplotlib) in Ubuntu 20.04

In Ubuntu 20.04, when you install an Enthought Python environment including pyqt 4 (for example, by installing the GettingStarted bundle 3.1 or earlier), and then try to import matplotlib, you may experience one or both of the following errors:

  • ImportError: /usr/lib/x86_64-linux-gnu/ undefined symbol: FT_Done_MM_Var
  • ModuleNotFoundError: No module named 'PySide'

To fix this, please update from pyqt 4 to pyqt 5. Using the Enthought Deployment Manager (EDM) from within this Enthought Python environment:

edm remove pyqt
edm install pyqt5
edm update --latest matplotlib

After doing this, some users see the error "QGtkStyle could not resolve GTK". To fix this, see Error in Linux: "QGtkStyle could not resolve GTK"

Please do not enter support requests in article comments

Please use article comments for suggestions to improve the article. For individual support requests, please follow these guidelines.



Have more questions? Submit a request


Powered by Zendesk