Installing Python
Xdoctest 1.4.0 requires Python 3.10 or newer. Install Python from python.org or create an isolated conda environment.
For example, after installing Miniconda following the official instructions, create and activate a compatible environment:
conda create --name xdoctest python=3.10 --yes
conda activate xdoctest
python -m pip install xdoctest
You can choose any newer supported Python version instead of 3.10. For working with virtual environments without conda, see the Python venv documentation.