yfukasawa / LongQC

LongQC is a tool for the data quality control of the PacBio and ONT long reads.
MIT License
148 stars 18 forks source link

"UnsatisfiableError" during installation #22

Open YePererva opened 3 years ago

YePererva commented 3 years ago

Hello! I encountered several errors while installing. Please, help to solve it.

Steps to reproduce:

With manual installation:

  1. Install Anaconda 3:
    # install anaconda prerequisites
    sudo apt install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6
    # install anaconsa itself
    cd ./Downloads
    wget https://repo.anaconda.com/archive/Anaconda3-2020.11-Linux-x86_64.sh
    bash ./Anaconda3-2020.11-Linux-x86_64.sh
    # allow to install to /home/username/anaconda3
    # reject running conda init at start-up of system
    # add conda to system $PATH varialbe
    export PATH="/home/username/anaconda3/bin:$PATH"

    This part works fine.

  2. Install prerequisites, as described in README.md file:
    # the following line works without problem:
    conda install h5py
    # the next line returns the 'UnsatisfiableError'
    conda install -c bioconda pysam
    # the following line works without problem:
    conda install -c bioconda edlib
    # the next line returns the 'UnsatisfiableError'
    conda install -c bioconda python-edlib

The error message for pysam is:

~$ conda install -c bioconda pysam
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

The error message for python-edlib is:

~$ conda install -c bioconda python-edlib
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

With DockerFile

  1. Installing Docker
    sudo apt update && sudo apt upgrade -y
    sudo apt install -y apt-transport-https ca-certificates curl gnupg
    sudo apt install -y docker-ce docker-ce-cli containerd.io

    It works. No error here.

  2. following instructions from README.md file:
cd /mnt/d/biotools
wget https://raw.githubusercontent.com/yfukasawa/LongQC/master/Dockerfile
sudo docker build -t longqc .

And the last line raises an error with the following log:

$ sudo docker build -t longqc .
Sending build context to Docker daemon  278.5MB
Step 1/26 : FROM continuumio/miniconda3
 ---> 52daacd3dd5d
Step 2/26 : MAINTAINER Yoshinori Fukasawa <yoshinori.fukasawa@kaust.edu.sa>
 ---> Using cache
 ---> 9cfac16065e5
Step 3/26 : RUN apt-get clean all &&     apt-get update &&     apt-get upgrade -y &&     apt-get install -y      git     build-essential     libc6-dev     zlib1g-dev &&     apt-get clean &&     apt-get purge
 ---> Using cache
 ---> 793730a77067
Step 4/26 : ENV USER user
 ---> Using cache
 ---> 80979e2b1106
Step 5/26 : ENV HOME /home/${USER}
 ---> Using cache
 ---> 0155bb0b6c1a
Step 6/26 : LABEL base_image="miniconda3"
 ---> Using cache
 ---> 0a7264391517
Step 7/26 : LABEL software="LongQC docker"
 ---> Using cache
 ---> 4b21c78cfca5
Step 8/26 : LABEL software.version="1.2"
 ---> Using cache
 ---> 90faa00bc325
Step 9/26 : RUN useradd -m ${USER}
 ---> Using cache
 ---> 243296d01b69
Step 10/26 : RUN echo "${USER}:test_pass" | chpasswd
 ---> Using cache
 ---> 9c07be4b060a
Step 11/26 : ADD https://api.github.com/repos/yfukasawa/longqc/git/refs/heads/minimap2_update version.json
Downloading     373B
 ---> Using cache
 ---> e41881c5db42
Step 12/26 : RUN git clone https://github.com/yfukasawa/LongQC.git $HOME/LongQC
 ---> Using cache
 ---> e0e39f42f46a
Step 13/26 : RUN cd $HOME/LongQC/minimap2-coverage && make
 ---> Using cache
 ---> 99e02c3d2a24
Step 14/26 : RUN conda update -y conda
 ---> Using cache
 ---> 2e13d687d385
Step 15/26 : RUN conda install -y numpy
 ---> Using cache
 ---> 0f257a341327
Step 16/26 : RUN conda install -y pandas'>=0.24.0'
 ---> Using cache
 ---> 6d627a9d63ec
Step 17/26 : RUN conda install -y scipy
 ---> Using cache
 ---> 822e6bb47c1f
Step 18/26 : RUN conda install -y jinja2
 ---> Using cache
 ---> fc01b5c48375
Step 19/26 : RUN conda install -y h5py
 ---> Using cache
 ---> 8652a02b3a1e
Step 20/26 : RUN conda install -y matplotlib'>=2.1.2'
 ---> Using cache
 ---> 6dc66c09087f
Step 21/26 : RUN conda install -y scikit-learn
 ---> Using cache
 ---> 987f6afa4db1
Step 22/26 : RUN conda install -y -c bioconda pysam
 ---> Running in b4ee5f7ad191
Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.
Solving environment: ...working... failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): ...working... done
Solving environment: ...working... failed with initial frozen solve. Retrying with flexible solve.

Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
failed

UnsatisfiableError: The following specifications were found to be incompatible with each other:

Output in format: Requested package -> Available versions

The command '/bin/sh -c conda install -y -c bioconda pysam' returned a non-zero code: 1

Please, advise the fix.

System info:

Jake-Goodall commented 3 years ago

I'm having the exact same issue on my MAC. A fix would be greatly appreciated.

yfukasawa commented 3 years ago

Hello @YePererva and @Jake-Goodall,

Sorry for late checking but thanks for contacting!! I'm now trying to reproduce the issue, tentatively installing ubuntu20.04 on a VM. I feel this might have been caused by your python version, which could be out of support in pysam and python-edlib. e.g. your python might be a newer one than the ones supported. conda, pysam, and python-elib are all supported by different teams; sometimes this kind of conflict happens.

Can I ask your python version? python --version

Yoshinori

YePererva commented 3 years ago

@yfukasawa, thank you for your responce!

I'm using Python 3.8.5 Is there any other info I should provide?

yfukasawa commented 3 years ago

Hi @YePererva ,

Thank you for sharing python version. I've tried installation on VM using both python3.8 and python3.7, and I could reproduce the issue if I use python3.8. It seems that conda packages of pysam/python-edlib are not compatible with python3.8 yet (not checked their specs carefully, but at least I got the same error).

I'll slightly modify the docker image, but tentative suggestion would be downgrading of your conda python to 3.7 or lower version. conda install python=3.7 then, install other dependencies.

Hope this helps. Yoshinori

grpiccoli commented 3 years ago

Hi @yfukasawa

I was having the same error and found out that it is fixed with python 3.9

I built the following Docker image https://hub.docker.com/repository/docker/grpiccoli/longqc

The Dockerfile is here: https://github.com/grpiccoli/longqc.nf/blob/master/Dockerfile

yfukasawa commented 3 years ago

Hi @grpiccoli,

Many thanks for checking with python 3.9! will update Dockerfile.

Best, Y.

grpiccoli commented 3 years ago

No worries, thank you for this useful tool, I just updated the docker image in dockerhub to be compatible with singularity, nextflow, snakemake and it uses alpine image to save a little space. I'm updating dockerfile as well in case it might be useful Best G

kim-fehl commented 3 years ago

Still getting this error when using file downloaded from the Releases. Has it been updated?

yfukasawa commented 3 years ago

Hi @kim-fehl, thanks for a reminder! Updated the Dockerfile, and it should be available in 1.2.0c. Let me know if this doesn't work for you.

hbadrane commented 8 months ago

Hi @yfukasawa

I was having the same error and found out that it is fixed with python 3.9

I built the following Docker image https://hub.docker.com/repository/docker/grpiccoli/longqc

The Dockerfile is here: https://github.com/grpiccoli/longqc.nf/blob/master/Dockerfile

Hello could you please explain some details on how to run it with singularity, I pulled the docker image as a sif file...