jnicoleoliveira / SPECData

Interactive spectroscopic data analysis tool.
6 stars 4 forks source link

ImportError: No module named backend_qt4agg #3

Closed jnicoleoliveira closed 7 years ago

jnicoleoliveira commented 7 years ago

I receive this issue when creating a new experiment. ImportError: No module named backend_qt4agg

jnicoleoliveira commented 7 years ago

This issue occurs due to a dependency issue for the qt4 backend for the matplotlib module (to display in the experiment view). To fix this, you may need one or both of the following solutions:

Solution 1:

Install missing matplotlib qt4 backend
>> sudo apt-get install python-matplotlib-qt4

Solution 2:

Adjust Matplotlib Configuration
Get the Matplotlib config file path
>> python
>> import matplotlib
>> matplotlib.matplotlib_fname()
u'/usr/lib64/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc'
Change the backend of the config file to qt4agg
>> vi /usr/lib64/python2.7/site-packages/matplotlib/mpl-data/matplotlibrc
Change the line to :
backend : qt4agg

[Source: StackOverflow] (http://stackoverflow.com/a/20583922)