I keep getting errors when using Inkscape that seem to imply that a python 2 vs 3 expectation isn't being met, though I have both of them installed. For instance, when I try to make a new document generated from a template, I get,
Traceback (most recent call last):
File "empty_generic.py", line 82, in <module>
c.affect()
File "/usr/share/inkscape/extensions/inkex.py", line 285, in affect
self.output()
File "/usr/share/inkscape/extensions/inkex.py", line 272, in output
self.document.write(sys.stdout)
File "src/lxml/lxml.etree.pyx", line 2033, in lxml.etree._ElementTree.write (src/lxml/lxml.etree.c:63667)
File "src/lxml/serializer.pxi", line 524, in lxml.etree._tofilelike (src/lxml/lxml.etree.c:134877)
File "src/lxml/lxml.etree.pyx", line 324, in lxml.etree._ExceptionContext._raise_if_stored (src/lxml/lxml.etree.c:10737)
File "src/lxml/serializer.pxi", line 441, in lxml.etree._FilelikeWriter.write (src/lxml/lxml.etree.c:133581)
TypeError: write() argument must be str, not bytes
where the last line seems to be just what I said-- usually this error is caused by running python 2 code with a python 3 interpreter, and can be fixed by simply passing the string object str as str.decode()
or something. Obviously, though, editing the inkscape source code is not an ideal solution.
Also, when trying to generate a Voronoi diagram, I get
Traceback (most recent call last):
File "voronoi2svg.py", line 36, in <module>
import simplepath
File "/usr/share/inkscape/extensions/simplepath.py", line 51
raise Exception, 'Invalid path data!'
^
SyntaxError: invalid syntax
which again seems like an obvious 2 vs. 3 error.
Is there a way to change the python interpreter being used by Inkscape?