Check python --version
.
I had 2yrs old server installed by ansible for py2 so i set that as default. Unfortunately didn't change back to version 3.
In my case fixed problem by:
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 1