mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-19 17:39:16 +02:00
deactivate any pre-activated conda environments, by returning to (base) and then deactivating that. On Windows and Linux
This commit is contained in:
parent
538dcec348
commit
a281efef04
@ -68,6 +68,10 @@ if exist "%cd%\profile" (
|
||||
set TMP=%cd%\tmp
|
||||
set TEMP=%cd%\tmp
|
||||
|
||||
@REM deactivate any pre-activated conda environments, by returning to (base) and then deactivating that
|
||||
call conda activate
|
||||
call conda deactivate
|
||||
|
||||
@call conda env create --prefix env -f environment.yaml || (
|
||||
@echo. & echo "Error installing the packages necessary for Stable Diffusion. Sorry about that, please try to:" & echo " 1. Run this installer again." & echo " 2. If that doesn't fix it, please try the common troubleshooting steps at https://github.com/cmdr2/stable-diffusion-ui/wiki/Troubleshooting" & echo " 3. If those steps don't help, please copy *all* the error messages in this window, and ask the community at https://discord.com/invite/u9yhsFmEkB" & echo " 4. If that doesn't solve the problem, please file an issue at https://github.com/cmdr2/stable-diffusion-ui/issues" & echo "Thanks!" & echo.
|
||||
pause
|
||||
|
@ -6,11 +6,6 @@ cp sd-ui-files/scripts/bootstrap.sh scripts/
|
||||
CONDA_BASEPATH=$(conda info --base)
|
||||
source "$CONDA_BASEPATH/etc/profile.d/conda.sh" # otherwise conda complains about 'shell not initialized' (needed when running in a script)
|
||||
|
||||
# deactivate any pre-activated conda environments
|
||||
for i in $(seq ${CONDA_SHLVL}); do
|
||||
conda deactivate
|
||||
done
|
||||
|
||||
# remove the old version of the dev console script, if it's still present
|
||||
if [ -e "open_dev_console.sh" ]; then
|
||||
rm "open_dev_console.sh"
|
||||
@ -67,6 +62,10 @@ else
|
||||
# prevent conda from using packages from the user's home directory, to avoid conflicts
|
||||
export PYTHONNOUSERSITE=1
|
||||
|
||||
# deactivate any pre-activated conda environments, by returning to (base) and then deactivating that
|
||||
conda activate
|
||||
conda deactivate
|
||||
|
||||
if conda env create --prefix env --force -f environment.yaml ; then
|
||||
echo "Installed. Testing.."
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user