Skip to content

Commit

Permalink
Update install.bat
Browse files Browse the repository at this point in the history
  • Loading branch information
PetervanLunteren authored Dec 11, 2024
1 parent 0234ad4 commit 066cf29
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions previous_versions/v4.3/install.bat
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,24 @@ if not exist "%LOCATION_ECOASSIST_FILES%\classification_models\cls_animals" mkdi
if not exist "%LOCATION_ECOASSIST_FILES%\classification_models\cls_persons" mkdir "%LOCATION_ECOASSIST_FILES%\classification_models\cls_persons"
if not exist "%LOCATION_ECOASSIST_FILES%\classification_models\cls_vehicles" mkdir "%LOCATION_ECOASSIST_FILES%\classification_models\cls_vehicles"

@REM remove all old ecoassist conda evironments on the conda way, if possible
set environments=ecoassistcondaenv ecoassistcondaenv-yolov8 ecoassistcondaenv-mewc ecoassistcondaenv-base ecoassistcondaenv-pytorch ecoassistcondaenv-tensorflow
for %%E in (%environments%) do (
echo "Attempting to remove environment %%E..."
if exist "%PATH_TO_CONDA_INSTALLATION%\envs\%%E" (
echo "Environment directory %%E exists. Proceeding with removal."
call %CONDA_EXECUTABLE% env remove -n %%E -y || (
echo "Could not mamba/conda env remove %%E, proceeding to remove via rd..."
rd /q /s "%PATH_TO_CONDA_INSTALLATION%\envs\%%E"
) || (
echo "There was an error trying to execute the conda command for %%E. Installation was terminated. Copy-paste all text in this console window and send it to peter@addaxdatascience.com for further support."
cmd /k & exit
)
) else (
echo "Environment directory %%E does not exist. Skipping removal."
)
)

@REM create conda env and install packages for MegaDetector
set PATH=%PATH_TO_CONDA_INSTALLATION%\Scripts;%PATH%
call "%PATH_TO_CONDA_INSTALLATION%\Scripts\activate.bat" "%PATH_TO_CONDA_INSTALLATION%"
Expand Down

0 comments on commit 066cf29

Please sign in to comment.