Move to python3
The end of life of Python 2 is 2020. OTB and gdal/ogr already support Python 3. Moving iota2 to Python 3 should not be difficult (see https://docs.python.org/3.3/howto/pyporting.html) and could be automated with https://github.com/mitsuhiko/python-modernize.
Before doing that, we must make sure that all our python dependencies work with Python 3.
On the OTB side, on needs to configure the build with:
GDAL_SB_EXTRA_OPTIONS:STRING=--with-python=/usr/bin/python3
OTB_WRAP_PYTHON:BOOL=ON
OTB_WRAP_PYTHON3:BOOL=ON
The environment vars to update are:
export LD_LIBRARY_PATH=${OTB_HOME}/lib:${OTB_HOME}/lib/otb/python3:$LD_LIBRARY_PATH
export PYTHONPATH=${OTB_HOME}/lib/otb/python3:${OTB_HOME}/lib/python3.5/site-packages:${PYTHONPATH}