Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with multiqc installation with micromamba #22

Closed
marcodelapierre opened this issue Nov 6, 2023 · 10 comments · Fixed by #23
Closed

Issue with multiqc installation with micromamba #22

marcodelapierre opened this issue Nov 6, 2023 · 10 comments · Fixed by #23

Comments

@marcodelapierre
Copy link
Member

When installing with the newer micromamba-based image, the image does not work.

The installation itself succeeds, but then any multiqc command gives an error of missing the typing_extensions python module. If I manually install it in the image, it then complains about imp, which I am unable to fix.

A quick look at the internet suggests that imp has been deprecated for a while, and hence has probably been removed in newer Pythons. importlib should be used instead.

So I think:

  • either we manage to use an older python with micromamba, or
  • if only we knew the multiqc developer, who might look into this ... ... @ewels ? 😊
@ewels
Copy link
Member

ewels commented Nov 6, 2023

It's because the container switched to Python 3.12. We already released a fix though, so either upgrade MultiQC to v1.17 or pin the Python version to 3.11.

@marcodelapierre
Copy link
Member Author

Thanks Phil.

I thought I had tested 1.17 earlier today with no luck, I will re-run.

Do you know how I can pin the python version with conda/mamba?

PS to reproduce the issue, I go along the lines of:

docker run --rm quay.io/nextflow/rnaseq-nf:v1.2.1 multiqc --version

@marcodelapierre
Copy link
Member Author

marcodelapierre commented Nov 6, 2023

Do you know how I can pin the python version with conda/mamba?

Found! ( I wrongly thought was some sort of special dependency )

https://mamba.readthedocs.io/en/latest/user_guide/micromamba.html#conda-yaml-spec-files

@marcodelapierre
Copy link
Member Author

marcodelapierre commented Nov 6, 2023

I confirm 1.17 is not enough:

FROM mambaorg/micromamba
MAINTAINER Paolo Di Tommaso <[email protected]>

RUN \
   micromamba install -y -n base -c defaults -c bioconda -c conda-forge \
      salmon=1.10.2 \
      fastqc=0.12.1 \
      multiqc=1.17 \
      procps-ng \
   && micromamba clean -a -y
   #   python=3.11 \

ENV PATH="$MAMBA_ROOT_PREFIX/bin:$PATH"
USER root

now pinning python ...

@marcodelapierre
Copy link
Member Author

marcodelapierre commented Nov 6, 2023

and neither does this, with multiqc 1.17 and py 3.11:

FROM mambaorg/micromamba
MAINTAINER Paolo Di Tommaso <[email protected]>

RUN \
   micromamba install -y -n base -c defaults -c bioconda -c conda-forge \
      salmon=1.10.2 \
      fastqc=0.12.1 \
      multiqc=1.17 \
      python=3.11 \
      procps-ng \
   && micromamba clean -a -y

ENV PATH="$MAMBA_ROOT_PREFIX/bin:$PATH"
USER root

will further test after the kids are in dreamland

@marcodelapierre marcodelapierre linked a pull request Nov 6, 2023 that will close this issue
@marcodelapierre
Copy link
Member Author

marcodelapierre commented Nov 6, 2023

All right, @ewels so we need python 3.11 AND typing_extensions AND importlib_metadata:

FROM mambaorg/micromamba
MAINTAINER Paolo Di Tommaso <[email protected]>

RUN \
   micromamba install -y -n base -c defaults -c bioconda -c conda-forge \
      salmon=1.10.2 \
      fastqc=0.12.1 \
      multiqc=1.17 \
      python=3.11 \
      typing_extensions \
      importlib_metadata \
      procps-ng \
   && micromamba clean -a -y

ENV PATH="$MAMBA_ROOT_PREFIX/bin:$PATH"
USER root

@marcodelapierre
Copy link
Member Author

marcodelapierre commented Nov 6, 2023

@ewels any idea why Micromamba requires explicit mention of importlib_metadata ?

Without it:

  File "/opt/conda/lib/python3.11/site-packages/multiqc/utils/config.py", line 17, in <module>
    import importlib_metadata
ModuleNotFoundError: No module named 'importlib_metadata'

I am surprised, because the setup.py explicitly mentions it: https://github.com/ewels/MultiQC/blob/master/setup.py#l66

@ewels
Copy link
Member

ewels commented Nov 6, 2023

I'm at a conference today + tomorrow, but maybe @vladsavelyev can take a look?

@ewels
Copy link
Member

ewels commented Nov 6, 2023

Argh, we didn't update the build requirements on bioconda: https://github.com/bioconda/bioconda-recipes/blob/master/recipes/multiqc/meta.yaml

@ewels
Copy link
Member

ewels commented Nov 7, 2023

Should be fixed in conda now 👍🏻

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants