Reputation: 5836
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.
Upvotes: 3
Views: 3541
Reputation: 299
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.
Upvotes: 1
Reputation: 888
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):
# pip uninstall meld
now /usr/bin/meld
as was installed via:
apt install meld
works fine.
Upvotes: 1