If PYTHONHOME is already set you'll need to unset it for activate to work correctly. The variable changes where Python looks for its libraries, regardless of where Python itself is, so having it set would cause any conda environment to look for things in the place. delgadom commented May ...
I like to know if it can be simplified and, more specifically, what exactly is happening with the VOL %%N: 2>NUL | FIND "%sn%" >NUL && CALL :CONTINUE %%N portion of things. Code Select Expand@ECHO OFF & SETLOCAL ENABLEDELAYEDEXPANSION:LOOKAGAIN...