Issue #25220: regrtest setups Python after parsing command line options
diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py
index 41c32d6..2716536 100644
--- a/Lib/test/libregrtest/main.py
+++ b/Lib/test/libregrtest/main.py
@@ -431,8 +431,8 @@
             os.system("leaks %d" % os.getpid())
 
     def main(self, tests=None, **kwargs):
-        setup_python()
         self.ns = _parse_args(sys.argv[1:], **kwargs)
+        setup_python()
         self.setup_regrtest()
         if self.ns.wait:
             input("Press any key to continue...")