You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I found and error when installing agnpy from pip, that brings the latests version of astropy (v0.5.1).
When importing agnpy it raises the following error (see below). I downgrade astropy to 4.2 and agnpy can be imported correctly.
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
/opt/conda/lib/python3.8/site-packages/astropy/units/_typing.py in <module>
8 try: # py 3.9+
----> 9 from typing import Annotated
10 except (ImportError, ModuleNotFoundError): # optional dependency
ImportError: cannot import name 'Annotated' from 'typing' (/opt/conda/lib/python3.8/typing.py)
During handling of the above exception, another exception occurred:
AttributeError Traceback (most recent call last)
<ipython-input-1-4024036b86cf> in <module>
----> 1 import agnpy
/opt/conda/lib/python3.8/site-packages/agnpy/__init__.py in <module>
----> 1 from .spectra import *
2 from .emission_regions import *
3 from .targets import *
4 from .synchrotron import *
5 from .compton import *
/opt/conda/lib/python3.8/site-packages/agnpy/spectra/__init__.py in <module>
----> 1 from .spectra import *
/opt/conda/lib/python3.8/site-packages/agnpy/spectra/spectra.py in <module>
1 # module containing the electron spectra
2 import numpy as np
----> 3 import astropy.units as u
4 from ..utils.math import trapz_loglog
5 from ..utils.conversion import mec2
/opt/conda/lib/python3.8/site-packages/astropy/units/__init__.py in <module>
38
39 from .structured import *
---> 40 from .decorators import *
41
42 del bases
/opt/conda/lib/python3.8/site-packages/astropy/units/decorators.py in <module>
11 import numpy as np
12
---> 13 from . import _typing as T
14 from .core import (Unit, UnitBase, UnitsError,
15 add_enabled_equivalencies, dimensionless_unscaled)
/opt/conda/lib/python3.8/site-packages/astropy/units/_typing.py in <module>
16
17 else:
---> 18 from typing_extensions import * # override typing
19
20 HAS_ANNOTATED = Annotated is not NotImplemented
AttributeError: module 'typing_extensions' has no attribute 'OrderedDictTypedDict'
The text was updated successfully, but these errors were encountered:
Hi,
I found and error when installing
agnpy
frompip
, that brings the latests version ofastropy
(v0.5.1).When importing
agnpy
it raises the following error (see below). I downgradeastropy
to 4.2 andagnpy
can be imported correctly.The text was updated successfully, but these errors were encountered: