File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -45,11 +45,16 @@ def find_cuda_libraries_in_path_list(paths_list_candidate: str) -> Iterable[Path
45
45
for dir_string in paths_list_candidate .split (os .pathsep ):
46
46
if not dir_string :
47
47
continue
48
+ if os .sep not in dir_string :
49
+ continue
48
50
try :
49
51
dir = Path (dir_string )
50
- if not dir .exists ():
51
- logger .warning (f"The directory listed in your path is found to be non-existent: { dir } " )
52
- continue
52
+ try :
53
+ if not dir .exists ():
54
+ logger .warning (f"The directory listed in your path is found to be non-existent: { dir } " )
55
+ continue
56
+ except OSError : # Assume an esoteric error trying to poke at the directory
57
+ pass
53
58
for lib_pattern in CUDA_RUNTIME_LIB_PATTERNS :
54
59
for pth in dir .glob (lib_pattern ):
55
60
if pth .is_file ():
@@ -63,8 +68,10 @@ def is_relevant_candidate_env_var(env_var: str, value: str) -> bool:
63
68
env_var in CUDART_PATH_PREFERRED_ENVVARS # is a preferred location
64
69
or (
65
70
os .sep in value # might contain a path
66
- and "CONDA" not in env_var # not another conda envvar
67
71
and env_var not in CUDART_PATH_IGNORED_ENVVARS # not ignored
72
+ and "CONDA" not in env_var # not another conda envvar
73
+ and "BASH_FUNC" not in env_var # not a bash function defined via envvar
74
+ and "\n " not in value # likely e.g. a script or something?
68
75
)
69
76
)
70
77
You can’t perform that action at this time.
0 commit comments