This question is somewhat similar to this one: How to efficiently access files with GDAL from an S3 bucket using VSIS3?, except I am trying to access bucket files from Google Cloud Storage, with Python. I am using GDAL 2.3.1, so I should be able to use the VSIGS virtual driver.
According the the example I came across, it looks like this simple piece of code should work:
from osgeo import gdal ds = gdal.Open('/vsigs/my_bucket/image.tif') # doesn't work ds = gdal.Open('gs://my_bucket/image.tif') # doesn't work either
But I keep getting a "file not found" error, so it looks like GDAL does not understand that I'm trying to open a GCS file. What am I missing?
gcloudis properly installed and configured on my computer (the command
gsutil ls gs://earthengine-public/works properly).
- I'm working inside a Python virtual environment, so that might be the issue there.