[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[python #DGC-337873]: Run MetPy on Google Colab?



Hello! Thanks for reaching out to us.

MetPy alone should install using Colab's magic commands to interact with the 
backend command line via pip:

  !pip install metpy

However, we've seen lately that cartopy, the mapping package we rely on for 
plotting, has trouble installing on Google Colab due to dependency issues when 
attempting to install via pip. So, there are a few potential solutions 
available that we've seen. These include using the backend `apt` package 
manager to install cartopy and/or its dependencies. We ourselves don't have a 
specific solution we can consistently point to and support yet, however it 
seems that currently installing cartopy via apt and then reinstalling shapely 
via pip will allow you to import and use cartopy (via StackOverflow and an 
existing Colab demo notebook):

  !apt-get -qq install python-cartopy python3-cartopy
  !pip uninstall -y shapely
  !pip install shapely --no-binary shapely

Thanks for your submission, and I hope this addresses your issues! If not, 
don't hesitate to follow up and let us know in more detail how we can help. We 
don't currently have specific demonstrations for using MetPy on Google Colab, 
but it seems like there may be value in us putting some together in the near 
future.


All the best,

Drew


> I have a quick question about running MetPy on Google Colab, which a cloud 
> based python platform for free.
> colab.research.google.com/
> 
> I was thinking of teaching MetPy in my class on Google Colab. This would be 
> especially valuable for students attending classes remotely.  I tried to set 
> MetPy on Colab several times, but I always ran into some library issues.  I 
> wonder if it is possible to run MetPy on Colab.  If so, can you share a 
> sample script to set it up?
> 


Ticket Details
===================
Ticket ID: DGC-337873
Department: Support Python
Priority: Low
Status: Closed
===================
NOTE: All email exchanges with Unidata User Support are recorded in the Unidata 
inquiry tracking system and then made publicly available through the web.  If 
you do not want to have your interactions made available in this way, you must 
let us know in each email you send to us.