Better handle PIP exceptions. Fixes #1