简体   繁体   English

Meld 未在 Ubuntu 中启动

[英]Meld not launching in Ubuntu

I just installed meld in Ubuntu 20.04.我刚刚在meld 20.04 中安装了 meld。 Upon trying to launch meld , I got the following error message:在尝试启动meld时,我收到以下错误消息:

Traceback (most recent call last):
  File "/usr/bin/meld", line 79, in <module>
    import meld.conf  # noqa: E402
ModuleNotFoundError: No module named 'meld.conf'

After this, I came across this solution where the answer suggests changing #!/usr/bin/python to #!/usr/bin/python2 .在此之后,我遇到了这个解决方案,其中答案建议将#!/usr/bin/python更改为#!/usr/bin/python2 Upon changing, I got the following error message:更改后,我收到以下错误消息:

  File "/usr/bin/meld", line 243
SyntaxError: Non-ASCII character '\xe2' in file /usr/bin/meld on line 243, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details

The solution for this being given here about the missing line # -*- coding: utf-8 -*- . 这里给出的解决方案是关于缺少的行# -*- coding: utf-8 -*- Now after this, I am back to original error:现在,在此之后,我又回到了原来的错误:

  File "/usr/bin/meld", line 81, in <module>
    import meld.conf  # noqa: E402
ImportError: No module named meld.conf

The only thing I have done is making python3 as the default python prior to this.我唯一做的就是在此之前将python3作为默认的python

Having similar problem with Ubuntu 22.04.1 LTS.与 Ubuntu 22.04.1 LTS 有类似问题。
After some debugging, I realized that I also had meld installed via:经过一些调试,我意识到我还通过以下方式安装了融合:
pip install meld pip 安装融合
resulted with undesired /usr/local/lib/python3.10/dist-packages/meld folder.导致不需要的 /usr/local/lib/python3.10/dist-packages/meld 文件夹。

My solution was running (as root):我的解决方案正在运行(以 root 身份):

# pip uninstall meld

now /usr/bin/meld as was installed via:现在 /usr/bin/meld 是通过以下方式安装的:
apt install meld易于安装融合
works fine.工作正常。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM