astropy / specutils

An Astropy coordinated package for astronomical spectroscopy. Maintainers: @rosteen @keflavich @eteq
http://specutils.readthedocs.io/en/latest/
170 stars 127 forks source link

compatibility issue between specutils and astrodrizzle #914

Closed orifox closed 2 years ago

orifox commented 2 years ago

I seem to have a problem importing with the following command in an environment with the latest specutils install. After debugging, I believe this has something to do with the version of asdf and, specifically, jsonschema, which are beyond my knowledge skillsets. But a dev should look into it and confirm.

from drizzlepac import tweakreg


---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe

 Coordinate transformation and image resampling library NOT found!

 Please check the installation of this package to insure C code was built successfully.
---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
~/miniconda3/envs/13ge/lib/python3.8/site-packages/drizzlepac/ablot.py in <module>
     22 try:
---> 23     from . import cdriz
     24 except ImportError:

ImportError: numpy.core.multiarray failed to import

During handling of the above exception, another exception occurred:

ImportError                               Traceback (most recent call last)
/var/folders/yh/kl4y3s1x3_j3ywy3qq67g3vc0001kc/T/ipykernel_36984/4226848202.py in <module>
     19 from IPython.display import Image
     20 
---> 21 from drizzlepac import tweakreg
     22 #from drizzlepac import astrodrizzle

~/miniconda3/envs/13ge/lib/python3.8/site-packages/drizzlepac/__init__.py in <module>
     19 from .version import *
     20 
---> 21 from . import ablot
     22 from . import adrizzle
     23 from . import astrodrizzle

~/miniconda3/envs/13ge/lib/python3.8/site-packages/drizzlepac/ablot.py in <module>
     26     print('\n Coordinate transformation and image resampling library NOT found!')
     27     print('\n Please check the installation of this package to insure C code was built successfully.')
---> 28     raise ImportError
     29 
     30 from .version import *

ImportError: 
rosteen commented 2 years ago

RuntimeError: module compiled against API version 0xf but this version of numpy is 0xe

Looks more like a numpy install mismatch error to me, did you install drizzlepac on an older version of numpy and then upgrade numpy? It sounded like there were some changes in 1.22 that were breaking things in astropy.

I was able to import tweakreg in a fresh environment with the latest drizzlepac and specutils installed, so I'm inclined to close this.

orifox commented 2 years ago

Ok, yes, it looks like there are all sorts of issues I'm having with the new astropy and astroscrappy. Darn. Ok, feel free to close this.