We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9351efd commit 04f2091Copy full SHA for 04f2091
src/pip/_internal/locations/_distutils.py
@@ -3,6 +3,14 @@
3
# The following comment should be removed at some point in the future.
4
# mypy: strict-optional=False
5
6
+# If pip's going to use distutils, it should not be using the copy that setuptools
7
+# might have injected into the environment. The least-worst option for ensuring this
8
+# seems to be to try to remove the injected shim, if it's injected.
9
+try:
10
+ __import__("_distutils_hack").remove_shim()
11
+except ImportError:
12
+ pass
13
+
14
import logging
15
import os
16
import sys
0 commit comments