m2lines / data-gallery

https://m2lines.github.io/data-gallery/
Apache License 2.0
0 stars 2 forks source link

Intro to XGCM import error #53

Closed IamShubhamGupto closed 7 months ago

IamShubhamGupto commented 7 months ago

stack trace

---------------------------------------------------------------------------
SystemError                               Traceback (most recent call last)
Cell In[1], line 3
      1 import xarray as xr
      2 import numpy as np
----> 3 import xgcm
      4 from matplotlib import pyplot as plt
      6 get_ipython().run_line_magic('matplotlib', 'inline')

File ~/miniconda3/envs/DGM2lines/lib/python3.9/site-packages/xgcm/__init__.py:6
      3 except ImportError:
      4     __version__ = "unknown"
----> 6 from .autogenerate import generate_grid_ds
      7 from .grid import Axis, Grid
      8 from .grid_ufunc import apply_as_grid_ufunc, as_grid_ufunc

File ~/miniconda3/envs/DGM2lines/lib/python3.9/site-packages/xgcm/autogenerate.py:3
      1 import xarray as xr
----> 3 from xgcm.grid import Axis, raw_interp_function
      6 def generate_axis(
      7     ds,
      8     axis,
   (...)
     16     attrs_from_scratch=True,
     17 ):
     18     """
     19     Creates c-grid dimensions (or coordinates) along an axis of
     20 
   (...)
     50         coordinates. These can only be calculated after the dims are created.
     51     """

File ~/miniconda3/envs/DGM2lines/lib/python3.9/site-packages/xgcm/grid.py:27
     24 from .padding import pad
     26 try:
---> 27     import numba  # type: ignore
     29     from .transform import conservative_interpolation, linear_interpolation
     30 except ImportError:

File ~/miniconda3/envs/DGM2lines/lib/python3.9/site-packages/numba/__init__.py:42
     38 from numba.core.decorators import (cfunc, generated_jit, jit, njit, stencil,
     39                                    jit_module)
     41 # Re-export vectorize decorators and the thread layer querying function
---> 42 from numba.np.ufunc import (vectorize, guvectorize, threading_layer,
     43                             get_num_threads, set_num_threads)
     45 # Re-export Numpy helpers
     46 from numba.np.numpy_support import carray, farray, from_dtype

File ~/miniconda3/envs/DGM2lines/lib/python3.9/site-packages/numba/np/ufunc/__init__.py:3
      1 # -*- coding: utf-8 -*-
----> 3 from numba.np.ufunc.decorators import Vectorize, GUVectorize, vectorize, guvectorize
      4 from numba.np.ufunc._internal import PyUFunc_None, PyUFunc_Zero, PyUFunc_One
      5 from numba.np.ufunc import _internal, array_exprs

File ~/miniconda3/envs/DGM2lines/lib/python3.9/site-packages/numba/np/ufunc/decorators.py:3
      1 import inspect
----> 3 from numba.np.ufunc import _internal
      4 from numba.np.ufunc.parallel import ParallelUFuncBuilder, ParallelGUFuncBuilder
      6 from numba.core.registry import DelayedRegistry

SystemError: initialization of _internal failed without raising an exception