mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-01-28 17:18:39 +01:00
Different way to use python path in dev shell
This commit is contained in:
parent
c947004ec9
commit
f514fe6c11
@ -54,6 +54,18 @@ def configure_env(dir):
|
||||
def print_env_info():
|
||||
which_cmd = "where" if platform.system() == "Windows" else "which"
|
||||
|
||||
python = "python"
|
||||
|
||||
def locate_python():
|
||||
nonlocal python
|
||||
|
||||
python = subprocess.getoutput(f"{which_cmd} python")
|
||||
python = python.split("\n")
|
||||
python = python[0].strip()
|
||||
print("python: ", python)
|
||||
|
||||
locate_python()
|
||||
|
||||
def run(cmd):
|
||||
with subprocess.Popen(cmd) as p:
|
||||
p.wait()
|
||||
@ -61,7 +73,7 @@ def print_env_info():
|
||||
run([which_cmd, "git"])
|
||||
run(["git", "--version"])
|
||||
run([which_cmd, "python"])
|
||||
run(["python", "--version"])
|
||||
run([python, "--version"])
|
||||
|
||||
print(f"PATH={os.environ['PATH']}")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user