How to activate conda environment in jenkins build
Use call activate myenv
to prevent activate from ending the current shell when it is finished. See https://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/call.mspx?mfr=true.
Bradley led me in the right direction and I found the solution...
I needed a windows equivalent for the Unix "source", and "call" does the job, as detailed in this other answer.
batch equivalent of "source" on windows: how to run a python script from a virtualenv
I hope someone will find this helpful in the future!
I think the activate script on Windows starts a new subshell which means the current shell exists immediately. Can you try manually setting the ENV variables like PATH and such instead of using activate?