ITK in Ubuntu 18.04

While installing ITK in Ubuntu 18.04 I got the following error message:
Does not support python version lower than 3.5

But I ran >>python3 --version in my terminal and it says python 3.6 installed!

How to solve it?

On Ubuntu 18.04, python defaults to version 2:

dzenan@corista:~/ITK-git-rel$ python --version
Python 2.7.15+
dzenan@corista:~/ITK-git-rel$ python2 --version
Python 2.7.15+
dzenan@corista:~/ITK-git-rel$ python3 --version
Python 3.6.9

So you need to set PYTHON_EXECUTABLE to /usr/bin/python3 in CMake, and possibly site-packages and library paths to version 3 specific locations too.

1 Like