I just had a quick look at your workflow action, and you are not activating/using the conda environment. In other words — as it seems you have discovered — the
python executable being used in your workflow is the system python, not the one managed by your conda environment.
The easiest way to resolve this is to activate the conda environment. Either append the following to an existing step (for example “Install dependencies”) or add a new step;
conda activate base
base here refers to the environment you used in your “Install dependencies” step.
Another alternative is to use the new
conda run command. To do that, add
conda run in from of all of your
python commands (for example in the “Unit Tests” step). By using
conda run you can run any executable as if the conda environment has been activated, but without actually having to explicitly activate it. I personally prefer the latter, but it seems like the best option for you is to use
conda activate <NAME>.