Revert "Fix pip module for python 3"

This reverts commit 06ac67c84a1ab5b2182806fef0b201bb9373549e.
Re-implement 06ac67c84a the right way since the state `__env__` was being confused by the shell environment. Refs #6129.