add support for python 3 only installation and fix python 3 test