This post made me move to Python 3.
I replaced all print statements, in the code I am currently working on, with print functions, and yum-installed python3 versions of the libraries.
The code ran correctly on first try. Guess I was lucky, should have made the shift earlier!