zblz / naima

Derivation of non-thermal particle distributions through MCMC spectral fitting
http://naima.readthedocs.io
BSD 3-Clause "New" or "Revised" License
45 stars 54 forks source link

error with matplotlib #159

Closed astrolog1986 closed 6 years ago

astrolog1986 commented 7 years ago

Dear all,

I installed naima by creating an environment with anaconda. Then when I try to use it, the following error appears "WARNING: Interactive fitting is not available because matplotlib is not installed: /usr/lib64/libxcb-xlib.so.0: undefined symbol: _xcb_lock_io [naima.core]"

but I have matplotlib installed. The fit continues without opening the window for interactive fitting. Can you please help me to solve this issue?

Thank you in advance

zblz commented 7 years ago

The error message could be improved, as it's clear that mpl is installed. Even with matplotlib installed, some backends might not be properly installed so that when importing some matplotlib modules an exception is thrown. Searching for the error you posted brings me to this anaconda issue which might be related.

Have you tried setting a different matplotlib backend? Try setting

import matplotlib
matplotlib.use('TkAgg')

before all other imports.