Multi QC error with IMP

Trying to run MultiQC on a new local Galaxy, but it fails. It looks like it doesn’t find imp. I have python 3.10 installed, but it seems MultiQC looks into a python3.12 folder within dependencies.
It seems this problem is known but I do not know how to resolve it. Should I install an older version of MultiQC and/or Galaxy?

Error is:

Traceback (most recent call last):
File “/home/jean-michel/galaxy/database/dependencies/_conda/envs/__multiqc@1.9/bin/multiqc”, line 6, in
from multiqc.main import multiqc
File “/home/jean-michel/galaxy/database/dependencies/_conda/envs/__multiqc@1.9/lib/python3.12/site-packages/multiqc/init.py”, line 16, in
from .multiqc import run
File “/home/jean-michel/galaxy/database/dependencies/_conda/envs/__multiqc@1.9/lib/python3.12/site-packages/multiqc/multiqc.py”, line 38, in
from .plots import table
File “/home/jean-michel/galaxy/database/dependencies/_conda/envs/__multiqc@1.9/lib/python3.12/site-packages/multiqc/plots/table.py”, line 9, in
from multiqc.utils import config, report, util_functions, mqc_colour
File “/home/jean-michel/galaxy/database/dependencies/_conda/envs/__multiqc@1.9/lib/python3.12/site-packages/multiqc/utils/report.py”, line 14, in
import lzstring
File “/home/jean-michel/galaxy/database/dependencies/_conda/envs/__multiqc@1.9/lib/python3.12/site-packages/lzstring/init.py”, line 11, in
from future import standard_library
File “/home/jean-michel/galaxy/database/dependencies/_conda/envs/__multiqc@1.9/lib/python3.12/site-packages/future/standard_library/init.py”, line 65, in
import imp
ModuleNotFoundError: No module named ‘imp’

Hello @Jean-Michel_Fustin_S

Your issue is similar to this one, correct? python - MultiQC: ModuleNotFoundError: No module named 'imp' - Stack Overflow

This is how to set up Python for your instance, and how to troubleshoot tool failures: Supported Python versions — Galaxy Project 23.1.1.dev0 documentation

It also looks like you could update the tool wrapper to the newest. The one you are using is a few versions older than the latest. But address the Python issue first. Galaxy | Tool Shed

Let us know how that goes and we can bring in others for more help.

Thanks Jen.
I tried to do this but this is what I got:

jean-michel@jeanmichel-System-Product-Name:~/galaxy$ rm -rf /home/jean-michel/galaxy/.venv
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ which -a python3 python
/usr/bin/python3
/bin/python3
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ export GALAXY_PYTHON=/usr/bin/python3
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ rm -rf /home/jean-michel/galaxy/database/compiled_templates/
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ sh run.sh
Creating Python virtual environment for Galaxy: .venv
using Python: /usr/bin/python3
To avoid this, use the --no-create-venv flag or set $GALAXY_VIRTUAL_ENV to an
existing environment before starting Galaxy.
The virtual environment was not created successfully because ensurepip is not
available. On Debian/Ubuntu systems, you need to install the python3-venv
package using the following command.

apt install python3.8-venv

You may need to use sudo with that command. After installing the python3-venv
package, recreate your virtual environment.

Failing command: [‘/home/jean-michel/galaxy/.venv/bin/python3’, ‘-Im’, ‘ensurepip’, ‘–upgrade’, ‘–default-pip’]

How should I proceed further?
Since I have python 3.10, should I run $ sudo apt install python3.10-venv

Thank you very much in advance!

JM

I continued with:

jean-michel@jeanmichel-System-Product-Name:~/galaxy$ sudo apt install python3.10-venv
[sudo] password for jean-michel:
Reading package lists… Done
Building dependency tree
Reading state information… Done
python3.10-venv is already the newest version (3.10.13-1+focal1).
The following packages were automatically installed and are no longer required:
gir1.2-goa-1.0 libxmlb1
Use ‘sudo apt autoremove’ to remove them.
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ which -a python3.10 python
/usr/bin/python3.10
/bin/python3.10
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ export GALAXY_PYTHON=/usr/bin/python3.10
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ rm -rf /home/jean-michel/galaxy/.venv
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ export GALAXY_PYTHON=/usr/bin/python3.10
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ rm -rf /home/jean-michel/galaxy/database/compiled_templates/
jean-michel@jeanmichel-System-Product-Name:~/galaxy$ sh run.sh
Creating Python virtual environment for Galaxy: .venv
using Python: /usr/bin/python3.10
To avoid this, use the --no-create-venv flag or set $GALAXY_VIRTUAL_ENV to an
existing environment before starting Galaxy.
Activating virtualenv at .venv
Requirement already satisfied: pip>=20.3 in ./.venv/lib/python3.10/site-packages (23.0.1)
Collecting wheel
Using cached wheel-0.41.3-py3-none-any.whl (65 kB)
Installing collected packages: wheel
Successfully installed wheel-0.41.3

It seemed to be all OK (in I did the right thing) but the error of MultiQC persists…

Thanks @Jean-Michel_Fustin_S for posting back more details.

It looks like your server is starting up a Python environment. Instead, you’ll want to use a Conda environment. The reasons are complex, but in short, the Conda way is the recommended default and resolves dependencies in a way that is supported. This is probably the root issue for your original error.

The Admin tutorials walk through the entire process. If your server is just for personal use, you could also consider using the Docker version instead, since much is pre-configured and that deployment has a simplified custom configuration guide.

I hope that helps! Feel free to follow up. If you can frame that question in the context of which deployment, and where you are in the set up process versus the tutorials, more people will be able to help out.