Git 运行 Meld 作为 merge 工具失败 'check_requirements import gi'

标签 git qt meld

尝试 merge 冲突文件时出错: Error while trying to merge conflicting files

作为版本控制,我使用 git 并调用 Meld 来 merge 冲突文件。 (作为 IDE,我使用 Qt Creator,但我认为这不是问题所在)。 我不明白为什么 merge 过程会失败,因为不同时间使用此过程来 merge 项目(远程和本地项目)。

最佳答案

gi 模块运行,除了it fails to find the GTK DLL :

---------------------------
cx_Freeze: Python error in main script
---------------------------
Traceback (most recent call last):
  File "bin/meld", line 205, in check_requirements
    import gi
  File "C:/msys64/MINGW32/lib/python3.7/site-packages/gi/__init__.py", line 42, in <module>
  File "ExtensionLoader_gi__gi.py", line 23, in <module>
  File "ExtensionLoader_gi__gi.py", line 15, in __bootstrap__
  File "C:/msys64/MINGW32/lib/python3.7/imp.py", line 342, in load_dynamic
ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:/msys64/MINGW32/lib/python3.7/site-packages\cx_Freeze/initscripts/__startup__.py", line 14, in run
  File "C:/msys64/MINGW32/lib/python3.7/site-packages\cx_Freeze/initscripts/Console.py", line 26, in run
  File "bin/meld", line 362, in <module>
    check_requirements()
  File "bin/meld", line 211, in check_requirements
    missing_reqs("GTK+", gtk_requirement, e)
  File "bin/meld", line 194, in missing_reqs
    show_error_and_exit(_("Cannot import: ") + mod + "\n" + str(exc))
  File "bin/meld", line 182, in show_error_and_exit
    raise Exception(error_text)
Exception: Cannot import: GTK+
DLL load failed: The specified module could not be found.

---------------------------
OK   
---------------------------

我已将 C:\Program Files (x86)\Meld\lib 添加到我的 Path user environment variable ,现在 Meld 工作正常。

关于Git 运行 Meld 作为 merge 工具失败 'check_requirements import gi',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55123873/

相关文章:

c++ - Qt 小部件在某些情况下无法重新绘制

python - Meld 需要 pygtk 2.8.0 或更高版本

python - 使用 Python3 将 meld 设置为 git mergetool

git - 不能做 git pull

c++ - 除了信号 - 槽机制之外,Qt 4 中需要 Q_OBJECT 宏的功能

c++ - C++/Qt 中的闭合轮廓

python - 某些应用程序使用 python 2.7,同时操作系统保留 python 2.6 (linux fedora/centos)

git - 通过 ssh 触发 jenkins 构建?

git - "Export"Visual Studio 2019 的 git 中的本地分支

git - 我如何对包含 ">"的字符串进行 git grep?