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. Fixes #6129.
Merge pull request #6143 from s0undt3ch/issues/6129-unexpected-__env__-keyword

Fix Issue #6129 unexpected `__env__`  keyword