Score:0

Warning message while rendering LaTeX in Inkscape

us flag

I installed pdflatex-full.

When I try to export a math expression using LaTeX in Inkscape 1.1 (with Extension -> Render -> Mathematics -> LaTeX (pdflatex) (in Inkscape 1.2, it is Extensions -> Render -> Formula (pdflatex))), I get the following warning message.

/usr/share/inkscape/extensions/inkex/command.py:73: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.spawn import find_executable

Since I am not using Python 3.12 (This issue is present on Ubuntu 22.04 and 22.10), this warning is does not help much, and it is extremely annoying when I need to generate many LaTeX expressions in Inkscape.

How to suppress this warning?

Score:0
us flag

This workaround is based on this answer.

Open the file /usr/share/inkscape/extensions/inkex/command.py, and add the following lines after python imports os and system.

import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning) 

Restart Inkscape, and the problem should be gone (unless the file is rewritten by a future update of Inkscape).

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.