astronify
astronify copied to clipboard
Error while imporrting.
Hi, I'm having the following traceback while importing astronify. I'm under Win11, Python 3.11.8, iPython 8.22: In [1]: import astronify
ImportError Traceback (most recent call last) Cell In[1], line 1 ----> 1 import astronify File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\astronify_init_.py:7 1 # Licensed under a 3-clause BSD style license - see LICENSE.rst 2 3 4 # Packages may add whatever they like to this file, but 5 # should keep this content at the top. 6 # ---------------------------------------------------------------------------- ----> 7 from ._astropy_init import * # noqa 8 # ---------------------------------------------------------------------------- 11 from . import series # noqa File ~\AppData\Local\Programs\Python\Python311\Lib\site-packages\astronify_astropy_init.py:21 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' (C:\Users\Utente\AppData\Local\Programs\Python\Python311\Lib\site-packages\astropy\config\configuration.py)
Thanks for any help on how to fix it.
Thanks for posting your issue. One thing to check: can you successfully import astropy by itself? And, do you have the latest version of astropy installed? What is the result of typing import astropy
into your Python session? If you are able to import astropy without any errors, what does print astropy.__version__
give?
Based on this thread (https://stackoverflow.com/questions/77973744/cannot-import-name-update-default-config-from-astropy-config-configuration), it's possible a newer version of astropy may be incompatible with the version of Astronify that's out now. If you still have issues, you can try installing an older version of astropy to see if that works, e.g., astropy==5.3.4
.