You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because pip ships with an __main__.py file, one valid way to invoke it
is: python /usr/lib/python3.6/site-packages/pip/. This results in
__package__ being the empty string This, in turn, triggers the code to
add the pip wheel to sys.path. Unfortunately, while this is fine to do
when it's restricted to a wheel just containing pip, it isn't okay to do
when it is site-packages as that will mean that other things in
site-packages could end up overriding things in the stdlib
(*cough*enum34*cough*).
Check file extension to limit when we end up adding the extra path to
sys.path.
0 commit comments