diff --git a/Lib/site.py b/Lib/site.py index 0fc92009e19af3..4f96ca91170c54 100644 --- a/Lib/site.py +++ b/Lib/site.py @@ -522,8 +522,13 @@ def main(): """ global ENABLE_USER_SITE - abs_paths() + orig_path = sys.path[:] known_paths = removeduppaths() + if orig_path != sys.path: + # removeduppaths() might make sys.path absolute. + # fix __file__ and __cached__ of already imported modules too. + abs_paths() + known_paths = venv(known_paths) if ENABLE_USER_SITE is None: ENABLE_USER_SITE = check_enableusersite()
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: