Mantid: workbench not running on Ubuntu 20.04

Hi,
I recently tried to build and install Mantid on Ubuntu 20.04.

The workbench wont start: I get the following errors (if excecuted int the terminal)

richard@leibniz:~/Mantid$ /opt/mantidunstable/bin/mantidworkbench

Traceback (most recent call last):
File “/opt/mantidunstable/bin/workbench”, line 11, in
load_entry_point(‘MantidWorkbench==6.0.0’, ‘gui_scripts’, ‘workbench’)()
File “/opt/mantidunstable/lib/workbench/app/main.py”, line 46, in main
start(options)
File “/opt/mantidunstable/lib/workbench/app/main.py”, line 50, in start
from workbench.app.start import start
File “/opt/mantidunstable/lib/workbench/app/start.py”, line 17, in
from mantidqt.utils.qt import plugins
File “/opt/mantidunstable/lib/mantidqt/utils/qt/init.py”, line 25, in
from qtpy.QtGui import QKeySequence # noqa
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “/usr/lib/python3/dist-packages/qtpy/QtGui.py”, line 23, in
from PySide2.QtGui import *
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘PySide2.QtGui’
Traceback (most recent call last):
File “/usr/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/opt/mantidunstable/lib/mantidqt/dialogs/errorreports/main.py”, line 16, in
from mantidqt.dialogs.errorreports.report import CrashReportPage
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “/opt/mantidunstable/lib/mantidqt/dialogs/errorreports/report.py”, line 8, in
from qtpy import QtCore, QtGui, QtWidgets
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “/usr/lib/python3/dist-packages/qtpy/QtGui.py”, line 23, in
from PySide2.QtGui import *
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘PySide2.QtGui’

Maybe I screwed up the build somewhere?
but not completely since using mantid with simpleapi in jupyter seems to work.

Another strange thing is that in
/usr/lib/python3/dist-packages/mantid.pth
the path where I donloaded the source can be found, too:
/home/richard/Mantid/bin/
/home/richard/Downloads/mantid-6.0.0-Source/qt/python/
/home/richard/Downloads/mantid-6.0.0-Source/Framework/PythonInterface/
/home/richard/Downloads/mantid-6.0.0-Source/qt/applications/workbench/

is this correct?

Any help is appreciated?

Cheers,
Richard

Hi, Richard.

I haven’t built on Ubuntu 20.04 myself, but can I check first that you ran the instructions specific to this environment: https://developer.mantidproject.org/GettingStarted.html#ubuntu-20-04

It looks like you built a package and installed it. Do you absolutely need to do this? You may be running into some of the problems our developers have with packaging on Ubuntu 20.04. You can start up your build running /home/richard/Mantid/bin/launch_mantidworkbench.sh or /home/richard/Mantid/bin/workbench

Tell me if that works for you!

Hi Daniel,

thanks for the reply. I followed the specific instructions for Ubuntu 20.04.
I did not git-clone the source code but rather downloaded it from:
https://download.mantidproject.org/
and I ran AddPythonPath.py after the installation.

What would be the alternative to building and installing the package? use the Ubuntu 18.04 version?

The result of your suggested command to start up the build is the following.

/home/richard/Mantid/bin/launch_mantidworkbench.sh

richard@leibniz:~/Mantid/bin$ ./launch_mantidworkbench.sh
/home/richard/Mantid/bin/site.py:26: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module’s documentation for alternative uses
import imp # Avoid import loop in Python 3
Traceback (most recent call last):
File “/home/richard/Mantid/bin/workbench”, line 11, in
load_entry_point(‘MantidWorkbench’, ‘gui_scripts’, ‘workbench’)()
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/applications/workbench/workbench/app/main.py”, line 46, in main
start(options)
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/applications/workbench/workbench/app/main.py”, line 50, in start
from workbench.app.start import start
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/applications/workbench/workbench/app/start.py”, line 17, in
from mantidqt.utils.qt import plugins
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/python/mantidqt/utils/qt/init.py”, line 25, in
from qtpy.QtGui import QKeySequence # noqa
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “/usr/lib/python3/dist-packages/qtpy/QtGui.py”, line 23, in
from PySide2.QtGui import *
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘PySide2.QtGui’
Traceback (most recent call last):
File “/usr/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File “/usr/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/python/mantidqt/dialogs/errorreports/main.py”, line 16, in
from mantidqt.dialogs.errorreports.report import CrashReportPage
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/python/mantidqt/dialogs/errorreports/report.py”, line 8, in
from qtpy import QtCore, QtGui, QtWidgets
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “/usr/lib/python3/dist-packages/qtpy/QtGui.py”, line 23, in
from PySide2.QtGui import *
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘PySide2.QtGui’

It differs for: /home/richard/Mantid/bin/workbench:

richard@leibniz:~/Mantid/bin$ ./workbench
Traceback (most recent call last):
File “./workbench”, line 11, in
load_entry_point(‘MantidWorkbench’, ‘gui_scripts’, ‘workbench’)()
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/applications/workbench/workbench/app/main.py”, line 46, in main
start(options)
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/applications/workbench/workbench/app/main.py”, line 50, in start
from workbench.app.start import start
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/applications/workbench/workbench/app/start.py”, line 17, in
from mantidqt.utils.qt import plugins
File “/home/richard/Downloads/mantid-6.0.0-Source/qt/python/mantidqt/utils/qt/init.py”, line 25, in
from qtpy.QtGui import QKeySequence # noqa
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
File “/usr/lib/python3/dist-packages/qtpy/QtGui.py”, line 23, in
from PySide2.QtGui import *
File “/usr/local/lib/python3.8/dist-packages/shiboken2/files.dir/shibokensupport/feature.py”, line 142, in _import
return original_import(name, *args, **kwargs)
ModuleNotFoundError: No module named ‘PySide2.QtGui’

I find it suspicious that the path
/home/richard/Downloads/mantid-6.0.0-Source/
appears in the logs above. It is the path where I downloaded and unpacked the sources.

Maybe I screwed things up during the build somewhere.
I can try to delete/remove everything and rebuild mantid

Best Richard