fix structure_prediction for python3