Fix issue on stage

pip isn't installed on our servers, so importing it dies. This moves the
import so it doesn't run in server environments.