How to install/use pygplates on Google Colab

Dear All,

I am a little bit a newbie to the programming world. I am learning python on my own, so there are some gritty nitty things.

I am waiting to see the conda or pip install for pygplates as I would like to incorporate pygplates in my jupyter notebook that I would like to share with other people that may be less familiar with python (than me!).

I can use pygplates just fine on my local PC, however, now I would like to write my codes on Google Colab as it might be easier for me to share my works with collaborators. I tried to append the sys.path to the folder on my google drive (that is mounted onto google colab) that contains the extracted files from pygplates package that I downloaded from the https://www.gplates.org/download/.

As I am a Windows user, I automatically use the package for Windows. But, when I am thinking about it, the Google Colab might not run on the Windows OS.

So, my question is if there anyone has tried to use pygplates on Google Colab or not. If so, would you mind walking me through how to install and import pygplates into my Colab notebook.

Best regards,
Ronnakrit “Ronnie” Rattanasriampaipong
PhD Candidate, Texas A&M University

Hi Ronnakrit,

I think the best bet might be to wait until pyGPlates supports Anaconda (as you said). The next pyGPlates release should support Anaconda, but we don’t have an estimate on the release date yet. There’s some info in this thread regarding compiling pyGPlates for Anaconda if you’re interested, but it get pretty technical.

I recall one user trying pyGPlates on Google Colab. Apparently the Colab instance was using Ubuntu 18.04. But ran into the following issue…

What you tried (with sys.path) would work for a pure Python package. However pyGPlates is a C extension, so this is unlikely to work (you’d need pre-compiled dependency libraries, required by pyGPlates, that are suitable for the Colab instance OS version, and even then I’m not sure if it’d work). Anaconda will be the recommendation for these scenarios in the (near-ish) future.

1 Like

Hi @john.cannon,

Thank you for your responses.
I cannot wait for pygplates to be available on Anaconda!