Matthew Grant
unread,Jul 11, 2021, 5:35:54 AM7/11/21Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to SciTools (iris, cartopy, cf_units, etc.) - https://github.com/scitools
I am wanting to use Iris in Google Colab, however I am having difficulty getting it imported. I have managed to install it through Conda, however when I import it, it returns the following error message:
ImportError Traceback (most recent call last)
<ipython-input-24-089b5db944e7> in <module>()
----> 1 import iris
6 frames
/usr/local/lib/python3.6/site-packages/cf_units/__init__.py in <module>()
43 from .util import _OrderedHashable, approx_equal
44
---> 45 from cf_units import _udunits2 as _ud
46 from cf_units._udunits2 import (UT_ASCII, UT_ISO_8859_1, UT_LATIN1, UT_UTF8,
47 UT_NAMES, UT_DEFINITION)
ImportError: cannot import name '_udunits2' from 'cf_units' (/usr/local/lib/python3.6/site-packages/cf_units/__init__.py)
I have checked and both cf_units and _udunits2 are installed, however it seems colab is struggling to identify _udunits when importing it. Does anyone know a way to fix this? Or, is there another way to install and import Iris in Google Colab without coming across this issue?
Thanks very much in advance!