I seem to have found a strange bug when trying to use rasterio 1.2.+ and Linux Metashape (the version I was mainly testing on was 1.7.6 but I have seen this in other versions as well)
I have only tested this when using the API or Python console with the installed Metashape version (not the .whl)
Specifically, Metashape crashes with a "Segmentation fault (core dumped)" message when attempting a simple rasterio open call such as:
import rasterio
f1 = rasterio.open("/path/to/raster/ortho.tif")
I uninstalled rasterio 1.2+ and installed rasterio 1.1.5 and the error disappeared.
I do not seem to see this bug in Windows Metashape and rasterio 1.2+, however.