--- a/src/pip/_internal/build_env.py
+++ b/src/pip/_internal/build_env.py
@@ -54,7 +54,11 @@ def get_runnable_pip() -> str:
         # case, we can use that directly.
         return str(source)
 
-    return os.fsdecode(source / "__pip-runner__.py")
+    filename = "__pip-runner__.pyc"
+    py = source / "__pip-runner__.py"
+    if py.is_file():
+        filename = "__pip-runner__.py"
+    return os.fsdecode(source / filename)
 
 
 def _get_system_sitepackages() -> Set[str]:
