I'd like to use the Python 3 interpreter within collectd, but there's no (documented) option to set the path or the version of the interpreter, and it defaults to the Python 2 interpreter that's also installed on my system (at /usr/bin/python2.7
).
My Python 3 interpreter is located at /usr/bin/python3
and /usr/bin/python
is symlinked to it; running "env python" and "python" both give me the Python 3 interpreter.
The documentation (unclear and looks unfinished IMO) on collectd's Python plugin mentions Python 3 :
Encoding Name - The default encoding for Unicode objects you pass to collectd. If you omit this option it will default to ascii on Python 2 and utf-8 on Python 3. This is hardcoded in Python and will ignore everything else, including your locale.
But that doesn't tell how to actually use Python 3 with it and Google doesn't seem to know either.