diff -r ae76a1046bb9 Lib/site.py --- a/Lib/site.py Wed Mar 16 14:30:16 2016 +0100 +++ b/Lib/site.py Sun Mar 20 12:51:13 2016 +0100 @@ -168,7 +168,7 @@ continue line = line.rstrip() dir, dircase = makepath(sitedir, line) - if not dircase in known_paths and os.path.exists(dir): + if not dircase in known_paths and os.path.exists(dir) and dir not in sys.path: sys.path.append(dir) known_paths.add(dircase) except Exception: @@ -194,7 +194,7 @@ else: reset = 0 sitedir, sitedircase = makepath(sitedir) - if not sitedircase in known_paths: + if not sitedircase in known_paths and sitedir not in sys.path: sys.path.append(sitedir) # Add path component known_paths.add(sitedircase) try: