doctest2 is a normal distutils library. Installation involves using the provided setup.py file with the distribution. Most of the time, this means running:
python setup.py install --user
In addition, doctest2 has several dependencies, some optional and some not.