error when trying to launch getdist-gui

Use of Cobaya. camb, CLASS, cosmomc, compilers, etc.
Post Reply
Nils Albin Nilsson
Posts: 2
Joined: April 13 2023
Affiliation: Observatoire de Paris
Contact:

error when trying to launch getdist-gui

Post by Nils Albin Nilsson » April 13 2023

Hello everyone,

I want to analyse some chains from CosmoMC using GetDist. I followed all instructions on how to install getdist via pip, including PySide6 etc, but I am unable to launch getdist-gui (in terminal). I get the following error

Code: Select all

nnilsson@syrtepc035:~$ getdist-gui 
Traceback (most recent call last):
  File "/obs/nnilsson/anaconda3/bin/getdist-gui", line 8, in <module>
    sys.exit(getdist_gui())
  File "/obs/nnilsson/anaconda3/lib/python3.9/site-packages/getdist/command_line.py", line 337, in getdist_gui
    from getdist.gui.mainwindow import run_gui
  File "/obs/nnilsson/anaconda3/lib/python3.9/site-packages/getdist/gui/mainwindow.py", line 53, in <module>
    from matplotlib.backends.backend_qtagg import FigureCanvasQTAgg as FigureCanvas
ModuleNotFoundError: No module named 'matplotlib.backends.backend_qtagg'
although I already have the correct version of matplotlib installed. Does anyone know how to solve this?

many thanks!

Nils Albin Nilsson
Posts: 2
Joined: April 13 2023
Affiliation: Observatoire de Paris
Contact:

Re: error when trying to launch getdist-gui

Post by Nils Albin Nilsson » April 14 2023

I finally figured this out, and my solution might help someone else.

I installed a lot of different packages, and eventually, the error message changed to

Code: Select all

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
and eventually I found that the following packages needed to be installed to fix the problem

Code: Select all

sudo apt-get install '^libxcb.*-dev' libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-dev libxkbcommon-x11-dev
and now the GUI is running perfectly.

Post Reply