The reason this code is using os.O_NOFOLLOW in the first place is to avoid a time of use vs time of check security flaw with the pip location directory. This change re-introduces the old vulnerable behaviour on platforms that *do* support os.O_NOFOLLOW.