Building rasterio from source does not inherit MrSID plugin (Windows 11)


I need to be able to read MrSID files with rasterio. According to the documentation, "The included GDAL library is fairly minimal, providing only the format drivers that ship with GDAL and are enabled by default. To get access to more formats, you must build from a source distribution (see below)."

Following the build instructions, I retrieved binaries from GIS internal. Specifically, from, I downloaded
GDAL Core: gdal-305-1928-x64-core.msi
GDAL MrSID plugin:
GDAL library and header files:

1) I installed GDAL core and the MrSID plugin to the default installation directory (C:\Program Files\GDAL).
2) I then unzipped the library and header files to the same installation directory, in the subfolder "release-1928-x64-gdal-3-5-1-mapserver-7-6-4-libs".
3) I created environmental variables GDAL_DATA="C:\Program Files\GDAL\gdal-data" and GDAL_DRIVER_PATH="C:\Program Files\GDAL\gdalplugins", and GDAL_VERSION=3.5.1. I also note that I have "C:\Program Files\GDAL" on the path variable itself due to a previous installation attempt
4) I opened Visual Studio 2022 Developer Command Prompt v17.3.1.
5) I created a virtual environment (Python version 3.7.9) and activate it
6) pip install numpy
7) pip install cython
8) python build_ext -I"C:\Program Files\GDAL\release-1928-x64-gdal-3-5-1-mapserver-7-6-4-libs\include" -lgdal_i -L"C:\Program Files\GDAL\release-1928-x64-gdal-3-5-1-mapserver-7-6-4-libs\lib" install
pip install --no-use-pep517 --global-option -I"C:\Program Files\GDAL\release-1928-x64-gdal-3-5-1-mapserver-7-6-4-libs\include" -lgdal_i -L"C:\Program Files\GDAL\release-1928-x64-gdal-3-5-1-mapserver-7-6-4-libs\lib" .

The build succeeds and I am able to import rasterio and open geotiff files with it. However, I am not able to open sid files. Typing rio env in the command prompt reveals no trace of the sid format driver. In contrast, gdalinfo <filename>.sid is able to interact with sid files fine. What am I missing?

Join to automatically receive all group messages.