首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Inkscape中呈现LaTeX时发出警告消息

在Inkscape中呈现LaTeX时发出警告消息
EN

Ask Ubuntu用户
提问于 2023-01-25 23:41:50
回答 1查看 137关注 0票数 0

我安装了pdflatex-full

当我试图在Inkscape 1.1中使用LaTeX导出一个数学表达式(带有扩展-> Render ->数学-> LaTeX (pdflatex))时,我会得到以下警告消息。

代码语言:javascript
复制
/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

由于我没有使用Python3.12(这个问题出现在Ubuntu22.04和22.10上),这个警告没有多大帮助,当我需要在Inkscape中生成许多LaTeX表达式时,这是非常恼人的。

如何压制这一警告?

EN

回答 1

Ask Ubuntu用户

回答已采纳

发布于 2023-01-25 23:41:50

这个解决方法是基于答案的。

打开文件/usr/share/inkscape/extensions/inkex/command.py,并在python ossystem之后添加以下行。

代码语言:javascript
复制
import warnings
warnings.filterwarnings("ignore", category=DeprecationWarning) 

重新启动Inkscape,问题就会消失(除非文件被Inkscape的未来更新重写)。

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1451862

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档