The problem is, there are many different ways you can do python version control, so on someones Mac, 'python3' may not call python.
To call a version of python 3, you need to run 'python3'. The 'python' command points to Python 2.7 who comes preinstalled on the computer (this version it too old for my script).
It's very easy to call the python script on windows, by using the command 'python' which should point to the latest version of python. I am using ProcessBuilder to call the python script and it does work (sort of) I am trying to call a python script from Java. Why is the output different in java? What is going on? mand('bash', '-c', 'eval', '$(echo \'which python3\')') Īll of these yield pretty much the exact same output. I have tried different methods of splitting the command for process builder, such as: (these output of all of these is the same as shown above) I tried so many variants of this command, such as: This is the same when I read from both the error stream, and the input stream. However, when I try and run this in java process builder, the exact output I get is: I am trying to use the UNIX 'which' command to find where a certain version of python is located.