Okay, I found that pyenv
can install debug versions (pyenv install X.Y.Z -g
).
- It builds versions from source
- so you are responsible for installing binary dependencies from Apt. You can find their list online though.
- Add the resulting installation to Travis cache and use e.g.
pyenv install -s
to avoid rebuilding.
- Pyenv identifier for debug versions is
X.Y.Z-debug
so it won’t clash with preinstalled alternative versions - Travis has Pyenv installed globally into
/opt
so need to runpyenv install
withsudo
. - Last time I checked,
pip
was unable to install packages for a debug Python – at least, in Windows.