mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-02-06 05:29:13 +01:00
Remove fixes for condabin, since we copy that for linux/mac now
This commit is contained in:
parent
648187d2aa
commit
739ad3a964
@ -60,19 +60,10 @@ conda = "conda"
|
|||||||
def locate_conda():
|
def locate_conda():
|
||||||
global conda
|
global conda
|
||||||
|
|
||||||
if OS_NAME == "Windows":
|
which = "where" if OS_NAME == "Windows" else "which"
|
||||||
conda = subprocess.getoutput("where conda")
|
conda = subprocess.getoutput(f"{which} conda")
|
||||||
conda = conda.split("\n")
|
conda = conda.split("\n")
|
||||||
conda = conda[0].strip()
|
conda = conda[0].strip()
|
||||||
else:
|
|
||||||
if "CONDA_BASEPATH" in os.environ:
|
|
||||||
base_path = os.environ["CONDA_BASEPATH"]
|
|
||||||
print(f"conda basepath: {base_path}")
|
|
||||||
else:
|
|
||||||
base_path = subprocess.getoutput("conda info --base")
|
|
||||||
|
|
||||||
conda = f"{base_path}/condabin/conda"
|
|
||||||
|
|
||||||
print("conda: ", conda)
|
print("conda: ", conda)
|
||||||
|
|
||||||
|
|
||||||
@ -272,7 +263,6 @@ def read_output(pipe, prefix=""):
|
|||||||
|
|
||||||
|
|
||||||
def run(cmds: list, cwd=None, env=None, stream_output=True, wait=True, output_prefix=""):
|
def run(cmds: list, cwd=None, env=None, stream_output=True, wait=True, output_prefix=""):
|
||||||
print("running:", " ".join(cmds))
|
|
||||||
p = subprocess.Popen(cmds, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
p = subprocess.Popen(cmds, cwd=cwd, env=env, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
|
||||||
if stream_output:
|
if stream_output:
|
||||||
output_thread = threading.Thread(target=read_output, args=(p.stdout, output_prefix))
|
output_thread = threading.Thread(target=read_output, args=(p.stdout, output_prefix))
|
||||||
|
Loading…
Reference in New Issue
Block a user