本文介绍了运行Meld作为合并工具的Git失败'check_requirements import gi'的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试合并有冲突的文件时出错:

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

解决方案

除了找不到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   
---------------------------

我已经在Path 用户环境变量中添加了C:\Program Files (x86)\Meld\lib,现在Meld可以正常工作了./p>

Error while trying to merge conflicting files:

As version control I use git and I call Meld in order to merge conflicting files. (As IDE I use Qt creator, but I do not think it can be the problem).I do not understand why the merge procedure fails, because different times this procedure was used in order to merge the projects (the remote and the local one).

解决方案

The gi module runs, except 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   
---------------------------

I've added C:\Program Files (x86)\Meld\lib to my Path user environment variable, and now Meld works fine.

这篇关于运行Meld作为合并工具的Git失败'check_requirements import gi'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-26 10:21