Avoid including Python warnings in version output. Fixes #397