0

I am trying to import Cube from iris.cube:

from iris.cube import Cube

but I keep receiving the message

The kernel appears to have died. It will restart automatically.

The same happens when I try to use geopandas: REG_data = gpd.read_file("./Shapefiles/Local_Authority_Districts_(December_2019)_Boundaries_UK_BUC.shp")

I uninstalled and reinstalled Jupyter.

I also uninstalled and re-installed

ipykernel
ipython
jupyter_client
jupyter_core
traitlets
ipython_genutils

but it didn't help.

I am using macOS Monterey, can't update the system for other reasons.

  • this just means something in your actual python process caused an unhandled error which your system killed. this often happens with memory explosions or really low-level errors. I'm surprised you're getting this on a simple import - you may have an issue with your environment. Are you using anaconda by any chance? if so, you may be mixing and matching packages from different channels - try installing everything into a new, clean environment, or perhaps deleting your anaconda installation and re-installing with [`miniforge`](https://github.com/conda-forge/miniforge). – Michael Delgado Dec 01 '22 at 18:20
  • @MichaelDelgado thank you for your suggestion, yes I am using anaconda – Abigail Dec 01 '22 at 21:37
  • got it - yeah. see e.g. [this answer](https://stackoverflow.com/a/74295187/3888719) for a bit more explanation. it discusses cartopy, but cartopy and iris have a lot of similarity in terms of their dependence on non-python dependencies which are a bit of a pain to manage and really important to keep your channels consistent. – Michael Delgado Dec 01 '22 at 21:42
  • @MichaelDelgado, thank you. Yes, I was having issues with `iris` and `cartopy`(now installed with conda forge as you suggested) . I re-installed anaconda, but the problem is still there. Should I install miniforge and then anaconda? How do install miniforge? – Abigail Dec 01 '22 at 22:14
  • No I’m saying don’t install anaconda at all. You can use conda commands with a miniforge install. – Michael Delgado Dec 01 '22 at 22:19

0 Answers0