'What is the exit code of the MacOS /usr/bin/python3 stub?
If you run /usr/bin/python3
on a MacOS system that has yet to install the system python3 it pops up a dialog that says: "Xcode-select: note: no developer tools were found at"...
Now unfortunately, on my macmini I've previously run this command, and so the /usr/bin/python3
stub has been replaced by the real python (python 3.8.9), and short of reseting/reinstall my mac I don't know how to get it back.
So my question is, what's the exit code for the /usr/bin/python3
stub?
The reason I'm asking is that I want to check in a script if the system python3 is installed or not, and checking the return code, would be more reliable / easier than comparing the strings in stdout/stderr.
Solution 1:[1]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Philippe |