MoinMoin installation script error

SYSTEM INFORMATION
OS type and version Ubuntu 20.04
Webmin version 1.990
Virtualmin version 6.17-3 Pro
Related packages MoinMoinWki

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

Keith

That maybe indicates it’s running with the wrong version of python. i.e. the script is python 2 but it’s being run in python 3.

Do you have python-is-python3 installed on your system?

I installed whatever is installed when you create a virtual server

Keith

Check to see if you have python-is-python3 installed on your system, please. We don’t install it, but it might explain the behavior you see.

dpkg -l python-is-python3

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

1 Like

I’m not a programmer or a Linux geek (I know enough to be dangerous, I will not attempt your temp fixes, I’ll just hang tight

Thanks

We can’t fix it. moinmoin only supports Python 2.

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.

Ok,
Thanks Joe, I won’t die if I can’t install it

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.