Since Inkscape 0.92, one can run extensions with a different python interpreter than the main application. I had to use this feature, because somehow Inkscape on my Ubuntu 20.04.3 LTS still used python 2.7.18 which the AxiDraw extension was not happy with.
“AxiDraw software must be run with python 3.6 or greater”
axidraw_deps/axidrawinternal/_init_.pyof the AxiDraw extension contains a check of the python version:
# Bail out if python is less than 3.5 import sys MIN_VERSION = (3, 6) if sys.version_info < MIN_VERSION: sys.exit("AxiDraw software must be run with python 3.6 or greater.")
The extension interpreters clearly document which interpreter is chosen.
axidraw.inxspecifies python as interpreter:
<script> <command reldir="extensions" interpreter="python">axidraw_control.py</command> </script>
~/.config/inkscape/preferences.xmldoes not list a python-interpreter, my deprecated python interpreter seems to be chosen.
Now we understand all building blocks. Time for a fix!
Open the file
~/.config/inkscape/preferences.xml and look for a
id="extensions". Add the following attribute:
/usr/bin/python3 is the interpreter, you want to use.)
In my case, the lines look as follows.
<group id="extensions" python-interpreter="/usr/bin/python3" org.inkscape.output.pdf.cairorenderer.PDFversion="PDF-1.5" org.inkscape.output.pdf.cairorenderer.resolution="96" org.inkscape.output.pdf.cairorenderer.bleed="0" org.inkscape.input.gdkpixbuf.jpg.link="link" command.evilmadscientist.axidraw-manager.copies="1" command.evilmadscientist.axidraw-manager.page_delay="15"
Current Inkscape versions can use a different python interpreter than GIMP itself.
One needs to understand that there is a level of indirection:
pythonin the INX file will look up
The fix makes Inkscape run extensions with python3.