The SymPy codebase has switched to using python3-style print functions. You'll need to rewrite this line accordingly and put "from __future__ import print_function" at the very top of this file.