When I imported aplpy, I got this error: ImportError Traceback (most recent call last) Input In [12], in <cell line: 9>() 7 from astropy.coordinates import SkyCoord 8 import astropy.units as u ----> 9 import aplpy as ap 10 from glob import glob 11 import astropy.units as u
File ~/opt/anaconda3/lib/python3.9/site-packages/aplpy/__init__.py:9, in <module>
2 """
3 APLpy : Astronomical Plotting Library in Python
4 """
6 # Affiliated packages may add whatever they like to this file, but
7 # should keep this content at the top.
8 # ----------------------------------------------------------------------------
----> 9 from ._astropy_init import * # noqa
10 # ----------------------------------------------------------------------------
12 if not _ASTROPY_SETUP_: # noqa
File ~/opt/anaconda3/lib/python3.9/site-packages/aplpy/_astropy_init.py:21, in <module>
19 import os
20 from warnings import warn
---> 21 from astropy.config.configuration import (
22 update_default_config,
23 ConfigurationDefaultMissingError,
24 ConfigurationDefaultMissingWarning)
26 # Create the test function for self test
27 from astropy.tests.runner import TestRunner
ImportError: cannot import name 'update_default_config' from 'astropy.config.configuration' (/Users/zly/opt/anaconda3/lib/python3.9/site-packages/astropy/config/configuration.py)`enter code here`
Looks like astropy removed that function.
https://docs.astropy.org/en/stable/changelog.html#id1