pauliacomi / pyGAPS-gui

A Qt graphical user interface for pyGAPS. WIP.
GNU Affero General Public License v3.0
17 stars 2 forks source link

_devicePixelRatioF import issue in matplotlib #34

Open ahardiag opened 1 year ago

ahardiag commented 1 year ago

Hi, I recently wanted to try py-GAPS GUI on Ubuntu 22.04.2 LTS. Using a conda install as follows :

conda create -n pygaps-gui python=3.8
conda activate pygaps-gui
pip install .

After running pygaps-gui, it gives :

  File "/opt/.conda/envs/pygaps-gui/lib/python3.8/site-packages/pygapsgui/widgets/IsoGraphToolbar.py", line 2, in <module>
    from matplotlib.backends.qt_compat import _devicePixelRatioF
ImportError: cannot import name '_devicePixelRatioF' from 'matplotlib.backends.qt_compat' (/opt/.conda/envs/pygaps-gui/lib/python3.8/site-packages/matplotlib/backends/qt_compat.py)

Indeed , _devicePixelRatioF have been removed in the last version of matplotlib (>= 3.7). Downgrading matplotlib to version 3.5.2 up to 3.6 fix this: pip uninstall matplotlib && pip install matplotlib==3.5.2