With python3.11 as python-exec global preference but for sci-libs/gdal using: PYTHON_SINGLE_TARGET="-python3_8 -python3_9 python3_10 -python3_11" gdal Python packages are installed in /usr/lib/python3.11/site-packages/ ebuild fixed for me by adding to mycmakeargs: -DPython_LOOKUP_VERSION=${EPYTHON#python} Tested with sci-libs/gdal-3.5.3-r1 which has the same problem.