把orig_path.sort(key=position_in_sys_path)所在的那一行,改成 orig_path = sorted(orig_path, key=position_in_sys_path)