【问题标题】:OSError: cannot load library 'gobject-2.0-0': Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'OSError: cannot load library \'gobject-2.0-0\': 此外,ctypes.util.find_library() 没有找到名为 \'gobject-2.0-0\' 的库
【发布时间】:2023-02-10 21:48:56
【问题描述】:
在安装 saleor 时,我遇到了以下问题。
OSError: cannot load library 'gobject-2.0-0': error 0x7e. Additionally, ctypes.util.find_library() did not manage to locate a library called 'gobject-2.0-0'
我已经尝试了 stack overflow 和 git 中给出的所有解决方案。似乎没有任何效果。
有人可以帮帮我吗?
Tools installed:
python: 3.8 / 3.9
GTK3
如其他解决方案所述,我还更新了环境变量顶部的 GTK3\bin。
【问题讨论】:
标签:
python-3.x
gtk3
oserror
saleor
django-weasyprint
【解决方案1】:
- 下载https://www.msys2.org/并安装。
a) 从 MSYS2 终端安装 gtk 包和 python 包。我们可以使用命令 shell 启动它。和
pacman -S mingw-w64-x86_64-gtk3
b) pacman -S mingw-w64-x86_64-python-gobject
- 将您的 $XDG_DATA_HOME 和 XDG_DATA_DIRS 更新为安装路径,例如:
'C:/msys64/mingw64/共享'
重新启动系统并检查,它会工作。