不在Ubuntu启动
我刚刚在 Ubuntu 20.04 中安装了 meld
。在尝试启动 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'
在此之后,我遇到 这个解决方案,其中答案建议将 #!/usr/bin/python
更改为#!/usr/bin/python2
。更改后,我收到以下错误消息:
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
给出的解决方案 这里关于缺少的行# -*-coding: utf-8 -*-
。现在,在此之后,我又回到了原来的错误:
File "/usr/bin/meld", line 81, in <module>
import meld.conf # noqa: E402
ImportError: No module named meld.conf
我所做的唯一一件事就是在此之前将 python3
设置为默认的 python
。
I just installed meld
in Ubuntu 20.04. Upon trying to launch meld
, I got the following error message:
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
. 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 -*-
. 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
ubuntu有类似的问题22.04.1 lts。
调试后,我意识到我也已安装了通过:
PIP安装融合
导致不希望的/USR/local/lib/python3.10/dist-packages/meld文件夹。
我的解决方案正在运行(作为根):
现在/usr/bin/meld
如通过以下方式安装的:
apt安装融合
正常工作。
Having similar problem with Ubuntu 22.04.1 LTS.
After some debugging, I realized that I also had meld installed via:
pip install meld
resulted with undesired /usr/local/lib/python3.10/dist-packages/meld folder.
My solution was running (as root):
now /usr/bin/meld
as was installed via:
apt install meld
works fine.
我对Ubuntu有问题22.04。最终发现我同时拥有A/usr/local/lib/python3和a/usr/local/lib/python3.10。 “ python3”具有DIST包装/键盘DIR,而3.10版则没有。实际上,3.10版本没有任何内容。因此,我将python3.10 dir移到了python3.10.save,然后做了“ sudo ln -s python3 python3.10”,之后一切都很好。我是从源构建的(我想要最新版本以及为什么在 /usr /local中),所以我想构建文件中的构建文件中存在错误。
I had a problem with Ubuntu 22.04. Finally figured out that I had both a /usr/local/lib/python3 and a /usr/local/lib/python3.10. The "python3" had a dist-packages/meld dir and the 3.10 version didn't; in fact, the 3.10 version had nothing in it. So I moved the python3.10 dir to python3.10.save and then did "sudo ln -s python3 python3.10" and after that all was good. I had built from source (I wanted the latest version and why it was in /usr/local), so I'll guess there is an error in the build files for meld.