How to activate conda environment in jenkins build How to activate conda environment in jenkins build windows windows

How to activate conda environment in jenkins build


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?