Fixed use of undefined exception

This PR fixes #1099 by simply changing an undefined exception to a builtin. This is in setup.py so a simple generic RuntimeError rather than a custom one seemed the simplest solution.