The best solution I found is to remove my Sphinx from the standard Python installation and install it inside my venv.
But then, I get another error:
No module named 'processing'
I tried to add the path to the processing plugin in my QGIS installation folder in the conf.py :
import os import sys from qgis.core import QgsApplication sys.path.insert(0, os.path.abspath(os.path.join(QgsApplication.pkgDataPath(), "python/plugins")))
which doesn't work (I verified the value of os.path.abspath(os.path.join(QgsApplication.pkgDataPath(), "python/plugins"))), which points well to the processing directory.
os.path.join(QgsApplication.pkgDataPath(), "python/plugins") returns only a complete QGIS path within the QGIS Python console; otherwise, QgsApplication needs to be initialised with a QGIS path. The simplest way to get the QGIS path is to hardcode it directly in the conf.py