While installing MoinMoinWki
the following error is kicked out in the install script
File “setup.py”, line 67
def visit((prefix, strip, found), dirname, names):
^
SyntaxError: invalid syntax
The work-around for this problem would be installing python2 package and telling Virtualmin using /usr/bin/python2 as default Python command on System Settings ⇾ Virtualmin Virtual Servers ⇾ Configuration: Advanced options page. Also, be careful as it may affect other Python scripts installed in the future.
Although, I have taken a closer look to this script installer and found few bugs that need fixing.
Moreover, in addition to my previous comment, you would also need to symlink /usr/bin/python to /usr/bin/python2 as the script’s shebang uses #!/usr/bin/python and would fail on not finding it.
All of these are work-arounds. I will look tomorrow into improving the installation process making it smoother.
Be careful messing around with Python versions and modules, as it may break other Python-related programs easily.
There are packages to handle this. No reason to do it manually; it’s harder to keep up with where it’s been done. python-is-python2 links python2 to python, and python-is-python3 does the other thing, I believe. Nobody should ever be manually poking at system files.
And, it’s also worth noting that if you make python be python2 permanently, it’s probably a mistake. I don’t know when moinmoin will get up to date, but Python 2 has been deprecated by the Python devs for a while now. I might even suggest that using moinmoin is a mistake, since it seems to be pretty lightly maintained. Converting to Python 3 for a large codebase isn’t a small project, but it isn’t a huge one, either (I’ve done it on a variety of projects big and small). I’m a little leery of a project that still hasn’t made the switch so long after Python 2 stopped being actively maintained. (Sunsetting Python 2 | Python.org)
And, for completeness, here’s MoinMoin’s Python3 statement: Python3 - MoinMoin
If you want it to successfully install on Ubuntu 20.04, you’ll have to install python2 and python-is-python2.
I’m not recommending it, per se, as Python 2 has been EOL for two years (though it is still maintained lightly by distros). But, if you need to run MoinMoin on Ubuntu 20.04 before they add support for Python 3, that’s how you do it.