无法安装Harf Buzz文本成形引擎

2024-09-28 01:32:39 发布

您现在位置:Python中文网/ 问答频道 /正文

我用harfbuzz来塑造字体。我是python的新手。我遵循Harf Buzz中给出的说明

但我听不懂这些台词

Make sure you have the installation lib dir in LD_LIBRARY_PATH, as needed for the linker to find the library.


Then make sure you also have GI_TYPELIB_PATH pointing to the resulting $prefix/lib/girepository-* directory.

在自述文件中。因此,我无法执行src/样本.py。 因为这个我


Traceback (most recent call last): File "sample.py", line 8, in <module> from gi.repository import HarfBuzz as hb ImportError: cannot import name HarfBuzz

提前谢谢。你知道吗


Tags: thetopathinpyimportyoulib
1条回答
网友
1楼 · 发布于 2024-09-28 01:32:39

Ubuntu已经为harfbuzz打包了gobject绑定。您不需要从源代码编译。你知道吗

› sudo apt install python-gobject-2-dev gobject-introspection libharfbuzz-gobject0
› python3 -c 'import gi; gi.require_version("HarzBuzz", "0.0"); from gi.repository import HarzBuzz'

相关问题 更多 >

    热门问题