I'm installing meld as described here:
sudo yum install intltool itstool gir1.2-gtksource-3.0 libxml2-utils
However, when I try to run meld this error appears:
File "/usr/bin/meld", line 47
print _("Meld requires %s or higher.") % modver
^
And indeed /usr/bin/meld has this code:
def missing_reqs(mod, ver):
modver = mod + " " + ".".join(map(str, ver))
print _("Meld requires %s or higher.") % modver
sys.exit(1)
I'm on CentOS 6.7, Python version 3.3.5.
Could you advise on what I'm doing wrong here?
EDIT:
Here's the command line, verbatim:
$ meld
File "/usr/bin/meld", line 47
print _("Meld requires %s or higher.") % modver
^
SyntaxError: invalid syntax
Here is a portion of meld script:
import sys
if "--pychecker" in sys.argv:
sys.argv.remove("--pychecker")
import os
os.environ['PYCHECKER'] = "--no-argsused --no-classattr --stdlib"
#'--blacklist=gettext,locale,pygtk,gtk,gtk.keysyms,popen2,random,difflib,filecmp,tempfile'
import pychecker.checker
#
# i18n support
#
sys.path[0:0] = [ "/usr/share/meld"
]
import paths
import gettext
_ = gettext.gettext
gettext.bindtextdomain("meld", paths.locale_dir())
gettext.textdomain("meld")
# Check requirements: Python 2.4, pygtk 2.8
pyver = (2,4)
pygtkver = (2,8,0)
def missing_reqs(mod, ver):
modver = mod + " " + ".".join(map(str, ver))
print _("Meld requires %s or higher.") % modver
sys.exit(1)
if sys.version_info[:2] < pyver:
missing_reqs("Python", pyver)
print is a statement in python2 just like your script has:
print _("Meld requires %s or higher.") % modver
But you are interpreting the script using python3 which does not have print statement rather has print() function.
You can try to replace all print with print() with a hope that nothing else breaks, which is not a good solution anyway.
Better just install python2:
sudo yum install python2
and use python2 as the interpreter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With