Install snappy on Google Colab error

I’m trying to install the snappy on Google Colab but I’m getting error during ProductIO import.
I used the following code:
! pip install snappy
!sudo apt-get install libsnappy-dev

!pip3 install python-snappy.

import snappy do not rise error but for
from snappy import jpy, GPF, HashMap, File
I get
ImportError Traceback (most recent call last)
in ()
----> 1 from snappy import jpy, GPF, HashMap, File

ImportError: cannot import name ‘jpy’

There are several different Python projects called “snappy”. I don’t think you can install the ESA SNAP snappy using pip, so you likely got some unexpected “snappy”.

If you are familiar with ESA SNAP, you already know ESA SNAP snappy requires an installation of ESA SNAP, which is a Java application. When you install SNAP you can ask to have snappy configured and supply the path to the python interpreter you want to use. “jpy” is a bidirectional interface between Java and Python. SNAP provides prebuilt Python wheels for various platforms and Python versions.

There has been interest in a “headless” command-line installation – maybe someone else has that working by now.

Colab FAQ says"Users with high computational needs may be interested in using Colab’s UI with a local runtime running on their own hardware."


Hi, I usually use snappy on google colab. It used to work fine via miniconda, but the last few days I’ve been having problems. Now when I import the libraries, python can’t find jpy even though it is installed. Is anyone else having this problem?