你能在Google CoLab上下载SciTools Iris软件包吗?
问题描述
我正在尝试下载Google Colab中的SciTools Iris包。我首先使用pip install,如下所示:
!pip install scitools-iris
然后使用:
导入虹膜import iris
但是,这将返回错误消息:
ERROR:root:An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line string', (1, 0))
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-20-089b5db944e7> in <module>()
----> 1 import iris
/usr/local/lib/python3.7/dist-packages/iris/__init__.py in <module>()
20 - https://pypi.org/project/irisapi/
21 - https://iris.claims/
---> 22 """)
RuntimeError:
Ambiguous 'iris' package.
Please use either:
**illumon-iris** - Python integration for Illumon Iris, a time-series database
- pip install illumon-iris
- https://pypi.python.org/pypi/illumon-iris
- https://deephaven.io/
**SciTools Iris** - Python library for analysing and visualising meteorological and oceanographic data sets
- http://scitools.org.uk/iris/
**info.gianlucacosta.iris** - A general-purpose library for Python
- pip install info.gianlucacosta.iris
- https://pypi.python.org/pypi/info.gianlucacosta.iris
**irisapi** - Iris is a highly configurable and flexible service for paging and messaging
- pip install irisapi
- https://pypi.org/project/irisapi/
- https://iris.claims/
我知道我想导入SciTools Iris包,但是它没有告诉我如何导入这个特定的包。有人知道如何在Google CoLab中导入SciTools Iris吗?
解决方案
我无法在Google Colab上重现此错误。我还注意到您的输出显示";以下回溯可能已损坏或无效";。当我试图运行一个例子时,我确实得到了一个与Numpy有关的错误,所以我升级了它。所以这就是对我有效的方法:
!pip install scitools-iris
!pip install numpy --upgrade
!pip install iris-sample-data
然后我复制并粘贴了此gallery example,它正常工作。
请注意,Irisv3.1现在已经发布。我不知道这会不会有什么不同。
相关文章