Use condabin's conda binary on linux and mac. Works around a bug in conda 4.14 (very old version)

This commit is contained in:
cmdr2 2024-10-11 18:48:48 +05:30
parent 72095a6d97
commit 02a2dce049

View File

@ -60,10 +60,14 @@ conda = "conda"
def locate_conda():
global conda
which = "where" if OS_NAME == "Windows" else "which"
conda = subprocess.getoutput(f"{which} conda")
conda = conda.split("\n")
conda = conda[0].strip()
if OS_NAME == "Windows":
conda = subprocess.getoutput("where conda")
conda = conda.split("\n")
conda = conda[0].strip()
else:
base_path = subprocess.getoutput("conda info --base")
conda = f"{base_path}/condabin/conda"
print("conda: ", conda)