State Scripts

Does mender state script execute in python 2 or python 3?

My script executes in python3 my_script.py but not in python my_script.py. How should I resolve this ?

Which interpreter is used to run the script depends on the first line in the file. Set the first line to

#!/usr/bin/python2

or

#!/usr/bin/python3

to specify which one to run with. This is not specific to Mender. It’s the standard UNIX way of doing things.

thanks @kacf