I am running pytest on a Jenkins machine; although I am not sure which Python it is actually running.
The machine is running OSX; and I did install various libraries (like numpy and others), on top of another Python install via Brew, so I keep things separated.
When I run the commands from console; I specify python2.6 -m pytest mytest.py, which works, but when I run the same via shell in Jenkins, it fail, because it can't find the right libraries (which are the extra libraries I did install, after installing Python via Brew).
Is there a way to know what is Jenkins using, so I can force it to run the correct python binary, which has access to my extra libraries?
You can use which python to find which python Jenkins use.
You can use ABSPATH/OF/python to run your pytest
how to find out which Python is called when I run pytest via Jenkins