Mantid 5.1 crash at start on unbuntu 18.04

No way to run mantid 5.1 on unbuntu 18.04

mantid 5.1.x was installed with an usual apt-get on Ubuntu 18.04.

At start it crashes systematically with the following errors:

Setup tools is >= 49. You may run into issues with a clean build.
If you are failing to launch with missing modules see
FrameworkManager-[Notice] Welcome to Mantid 5.1.20201126.1329
FrameworkManager-[Notice] Please cite: and this release:
DownloadInstrument-[Notice] All instrument definitions up to date
Traceback (most recent call last):
  File "/opt/mantidnightly/lib/workbench/app/", line 195, in start
    exit_value = start_workbench(app, options)
  File "/opt/mantidnightly/lib/workbench/app/", line 130, in start_workbench
  File "/opt/mantidnightly/lib/workbench/app/", line 164, in setup
    self.ipythonconsole = JupyterConsole(self)
  File "/opt/mantidnightly/lib/workbench/plugins/", line 46, in __init__, font_size=font.pointSize())
  File "/opt/mantidnightly/lib/mantidqt/widgets/", line 60, in __init__
  File "/usr/local/lib/python3.6/dist-packages/IPython/core/", line 2675, in ex
    exec(cmd, self.user_global_ns, self.user_ns)
  File "<string>", line 3, in <module>
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/", line 2336, in <module>
  File "/usr/local/lib/python3.6/dist-packages/matplotlib/", line 296, in switch_backend
    getattr(backend_mod, func_name))
  File "/usr/lib/python3.6/", line 3065, in signature
    return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File "/usr/lib/python3.6/", line 2815, in from_callable
  File "/usr/lib/python3.6/", line 2372, in _signature_from_callable
    return _signature_bound_method(sig)
  File "/usr/lib/python3.6/", line 1795, in _signature_bound_method
    raise ValueError('invalid method signature')
ValueError: invalid method signature
errorreports-[Error] Continue working.

Is there a fix to this?

Python 3.6.9


The first thing to try is downgrading setuptools as there is an issue with versions 49 and above.

Can you downgrade using:

python3 -m pip install setuptools==48.0.0 

Tell me if that solves the problem or not!

Presumably, you updated it for some other piece of software. If this other version is required then you could consider using virtual envirnoments for different projects: 12. Virtual Environments and Packages — Python 3.6.13 documentation

In this case I suspect its Matplot lib looking at the stack trace, specifically when it’s switching it’s back end.

Locally I have 2.1.1, which was installed with my local Ubuntu.
@ollivier Have you upgraded / installed MPL 3.3, or installed another pip package that brought it along?

Could you try pip3 install matplotlib==2.1.1 and restarting Mantid?

Thanks for your kind help @DavidFair and @danielmurphy22.

The setuptools is not an issue since another machine with the same Ubuntu flavor has a setuptools version 39.0.1 despite the same crash problem.

Finally the solution of David was the working one. I found even that on our virtual linux Ubuntu 18.04 machines (accessible through, where the 5.1.x Mantid works, have even a more recent version of matplotlib, i.e., matplotlib==3.0.3.

After downgrading to Mpl 3.0.3 sudo -E -H pip3 install matplotlib==3.0.3, Mantid ‘5.1.20201126.1329’ workbench runs nicelly.

I’m not reluctant in enclosing each application into a “bundle” (a term from Mac OSX world) as suggested but if Mantid provides somewhere a (minimal) requirement.txt list out of pip3 freeze this could be a safe solution.

Ah, that makes sense. Looking at Launchpad we have likely started workbench with 3.1.2, but 3.3 is only shipping with 20.10 which I don’t think anyone has tested as far as I know.

@DanielMurphy22 is it worth opening an issue about MPL 3.3 causing issues? I’m sure were going to have more people run into it once 20.04 is officially supported by Mantid and people start trying out 20.10, or latest versions of Fedora

@DavidFair Sure, threw together this: Workbench won't launch on Linux with MPL 3.3 · Issue #30098 · mantidproject/mantid · GitHub