mirror of
https://github.com/ParisNeo/lollms.git
synced 2025-01-20 11:39:11 +00:00
fixed
This commit is contained in:
parent
880e2ed1c7
commit
d89975c02e
@ -47,8 +47,9 @@ def create_conda_env(env_name, python_version):
|
|||||||
if platform.system()=="Windows":
|
if platform.system()=="Windows":
|
||||||
conda_path = Path(sys.executable).parent.parent/"miniconda3"/"condabin"/"conda"
|
conda_path = Path(sys.executable).parent.parent/"miniconda3"/"condabin"/"conda"
|
||||||
else:
|
else:
|
||||||
conda_path = Path(sys.executable).parent.parent/"miniconda3"/"bin"/"conda"
|
conda_path = Path(sys.executable).parent.parent.parent/"miniconda3"/"bin"/"conda"
|
||||||
|
ASCIIColors.red("Conda path:")
|
||||||
|
ASCIIColors.yellow(conda_path)
|
||||||
process = subprocess.Popen(f'{conda_path} create --name {env_name} python={python_version} -y', shell=True)
|
process = subprocess.Popen(f'{conda_path} create --name {env_name} python={python_version} -y', shell=True)
|
||||||
|
|
||||||
# Wait for the process to finish
|
# Wait for the process to finish
|
||||||
@ -102,8 +103,10 @@ def run_script_in_env(env_name, script_path, cwd=None):
|
|||||||
if platform.system()=="Windows":
|
if platform.system()=="Windows":
|
||||||
python_path = Path(sys.executable).parent.parent/"miniconda3"/"condabin"/"conda"
|
python_path = Path(sys.executable).parent.parent/"miniconda3"/"condabin"/"conda"
|
||||||
else:
|
else:
|
||||||
python_path = Path(sys.executable).parent.parent/"miniconda3"/"bin"/"conda"
|
python_path = Path(sys.executable).parent.parent.parent/"miniconda3"/"bin"/"conda"
|
||||||
# Activate the Conda environment
|
# Activate the Conda environment
|
||||||
|
ASCIIColors.red("Python path:")
|
||||||
|
ASCIIColors.yellow(python_path)
|
||||||
subprocess.Popen(f'{python_path} activate {env_name} && {script_path}', shell=True, cwd=cwd)
|
subprocess.Popen(f'{python_path} activate {env_name} && {script_path}', shell=True, cwd=cwd)
|
||||||
#run_command(Commands.RUN, "-n", env_name, str(script_path), cwd=cwd)
|
#run_command(Commands.RUN, "-n", env_name, str(script_path), cwd=cwd)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user