Skip to content

Conflict between pyirf.gammapy (gammapy 1.3) and matplotlib 3.10 #299

Description

@antonioiuliano2

Dear all,

with a clean installation from the main branch, I get this error:

import pyirf.gammapy

import pyirf.gammapy
Traceback (most recent call last):
File "", line 1, in
File "/home/utente/Lavoro/CTA/pyirf/pyirf/gammapy.py", line 6, in
from gammapy.irf import EffectiveAreaTable2D, PSF3D, EnergyDispersion2D
File "/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/gammapy/irf/init.py", line 4, in
from .background import Background2D, Background3D, BackgroundIRF
File "/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/gammapy/irf/background.py", line 9, in
from gammapy.maps import MapAxes, MapAxis
File "/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/gammapy/maps/init.py", line 10, in
from .region import RegionGeom, RegionNDMap
File "/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/gammapy/maps/region/init.py", line 2, in
from .geom import RegionGeom
File "/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/gammapy/maps/region/geom.py", line 11, in
from astropy.visualization.wcsaxes import WCSAxes
File "/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/astropy/visualization/wcsaxes/init.py", line 19, in
from .helpers import *
File "/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/astropy/visualization/wcsaxes/helpers.py", line 8, in
from mpl_toolkits.axes_grid1.anchored_artists import AnchoredEllipse, AnchoredSizeBar
ImportError: cannot import name 'AnchoredEllipse' from 'mpl_toolkits.axes_grid1.anchored_artists' (/home/utente/miniforge3/envs/pyirf/lib/python3.11/site-packages/mpl_toolkits/axes_grid1/anchored_artists.py)

I believe it to be related to this gammapy post about matplotlib 3.10:
gammapy/gammapy#5659

Should the environment.yml file require gammapy<3.10 until this issue is solved on the gammapy side?

Best Regards,
Antonio

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions