Added python version handling