From f732fa97360df6c9261d5fa90846c8b5d6eabdd3 Mon Sep 17 00:00:00 2001 From: cmdr2 Date: Tue, 25 Oct 2022 20:26:46 +0530 Subject: [PATCH] Use call to start the conda script; activate the installer env first even in the developer console --- scripts/Developer Console.cmd | 3 +++ scripts/Start Stable Diffusion UI.cmd | 2 +- scripts/developer_console.sh | 6 ++++++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/scripts/Developer Console.cmd b/scripts/Developer Console.cmd index 81676136..6b70b54f 100644 --- a/scripts/Developer Console.cmd +++ b/scripts/Developer Console.cmd @@ -8,6 +8,9 @@ set PATH=C:\Windows\System32;%PATH% if exist "installer" set PATH=%cd%\installer;%cd%\installer\Library\bin;%cd%\installer\Scripts;%cd%\installer\Library\usr\bin;%PATH% if exist "installer_files\env" set PATH=%cd%\installer_files\env;%cd%\installer_files\env\Library\bin;%cd%\installer_files\env\Scripts;%cd%\installer_files\Library\usr\bin;%PATH% +@rem activate the installer env +call conda activate + @rem Test the environment echo "Environment Info:" call where git diff --git a/scripts/Start Stable Diffusion UI.cmd b/scripts/Start Stable Diffusion UI.cmd index c0880c0f..5453a606 100644 --- a/scripts/Start Stable Diffusion UI.cmd +++ b/scripts/Start Stable Diffusion UI.cmd @@ -12,7 +12,7 @@ call scripts\bootstrap.bat if exist "installer_files\env" set PATH=%cd%\installer_files\env;%cd%\installer_files\env\Library\bin;%cd%\installer_files\env\Scripts;%cd%\installer_files\Library\usr\bin;%PATH% @rem activate the installer env -conda activate +call conda activate @rem Test the bootstrap call where git diff --git a/scripts/developer_console.sh b/scripts/developer_console.sh index b9f1341e..a36c6a14 100755 --- a/scripts/developer_console.sh +++ b/scripts/developer_console.sh @@ -8,6 +8,12 @@ if [ "$0" == "bash" ]; then if [ -e "installer" ]; then export PATH="$(pwd)/installer/bin:$PATH"; fi if [ -e "installer_files/env" ]; then export PATH="$(pwd)/installer_files/env/bin:$PATH"; fi + # activate the installer env + CONDA_BASEPATH=$(conda info --base) + source "$CONDA_BASEPATH/etc/profile.d/conda.sh" # avoids the 'shell not initialized' error + + conda activate + # test the environment echo "Environment Info:" which git