import os import sys os.environ.pop("PYTHONHOME", None) os.environ.pop("PYTHONPATH", None) os.environ.pop("PYTHONSTARTUP", None) if sys.executable.endswith(".original"): sys.executable = sys.executable[:-9]