Closed peteostro closed 9 months ago
If you're receiving this error, you're on a version of macOS earlier than macOS Monterey 12.x. Those versions of macOS still have Python 2 available and the script runs fine with Python 2 set as the system Python version.
As macOS Monterey is now two OS major versions behind the current shipping OS of macOS Sonoma 14.1.1, the script will not be updated to address the scenario of "older than macOS Monterey and running Python 3.x".
I'm using Redhat which comes with python 3
the error I get with python 3 is
File "
When I run with python2 it works fine. Possible security issues installing python 2 as its EOL macOS Sonoma comes with python 3 not 2 so the script will also not work with the newer OS's
macOS Sonoma does not come with a system Python at all. Python was deprecated and removed from macOS by Apple as of macOS 12.3. Python 3 is available as part of Apple's developer tools, but is not included with macOS by default.
This script was written to run on macOS only and is not guaranteed to work correctly on any other OS platform.
Ok thanks, Using Linux as we want this to execute from a server once a month. I've modified the script so it deletes computers that are in a smart group so it does not need a local file.
to make it work with python 3 had to just add some () around print as its a function now (thanks stackoverflow)
print(json.load(sys.stdin)["token"])
get an issue with python -c 'import sys, json; print json.load(sys.stdin)["token"]
Errors out. Works with python 2