tseemann / abricate

:mag_right: :pill: Mass screening of contigs for antimicrobial and virulence genes
GNU General Public License v2.0
354 stars 87 forks source link

Difficulties installing ABRicate (conda and linuxbrew) #171

Closed MrTomRod closed 2 years ago

MrTomRod commented 3 years ago

Today, I had some problems installing ABRicate. It worked, but only with a python 3.6 conda container.

With python 3.8 and 3.9 environment (miniconda 4.10.1), I got this error:

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

Output in format: Requested package -> Available versions

Package libgcc-ng conflicts for:
python=3.8 -> zlib[version='>=1.2.11,<1.3.0a0'] -> libgcc-ng[version='>=4.9|>=7.2.0']
python=3.8 -> libgcc-ng[version='>=7.3.0|>=7.5.0|>=9.3.0']

Package bzip2 conflicts for:
python=3.8 -> bzip2[version='>=1.0.8,<2.0a0']
abricate=1.0 -> blast[version='>=2.7'] -> bzip2[version='1.0.*|>=1.0.6,<2.0a0|>=1.0.8,<2.0a0']

Package libstdcxx-ng conflicts for:
python=3.8 -> libstdcxx-ng[version='>=7.3.0|>=7.5.0|>=9.3.0']
python=3.8 -> libffi[version='>=3.2.1,<3.3.0a0'] -> libstdcxx-ng[version='>=4.9|>=7.2.0']

Meanwhile, I tried Homebrew 3.1.9-58-g7ae9cc3: brew tap brewsci/bio && brew install brewsci/bio/abricate

==> Installing brewsci/bio/abricate dependency: openssl@1.1
==> perl Makefile.PL INSTALL_BASE=/home/troder/.linuxbrew/Cellar/openssl@1.1/1.1.1k/libexec
==> make PERL5LIB=/home/troder/.linuxbrew/Cellar/openssl@1.1/1.1.1k/libexec/lib/perl5 CC=gcc-5
Last 15 lines from /home/troder/.cache/Homebrew/Logs/openssl@1.1/02.make:
2021-05-27 17:52:40 +0200

make
PERL5LIB=/home/troder/.linuxbrew/Cellar/openssl@1.1/1.1.1k/libexec/lib/perl5
CC=gcc-5

Can't locate ExtUtils/Command.pm in @INC (you may need to install the ExtUtils::Command module) (@INC contains: inc blib/arch blib/lib /home/troder/.linuxbrew/Cellar/openssl@1.1/1.1.1k/libexec/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5).
BEGIN failed--compilation aborted.
make: *** [Makefile:437: blib/lib/ExtUtils/.exists] Error 2

READ THIS: https://docs.brew.sh/Troubleshooting

These open issues may also help:
Missing some Perl dependencies in openssl@1.1 https://github.com/Homebrew/linuxbrew-core/issues/22985
Cannot update openssl@1.1 because their test fails https://github.com/Homebrew/linuxbrew-core/issues/22015

Did I do something wrong? If not, it would be great if these issues could be fixed.

MrTomRod commented 2 years ago

Had to install abricate again. By now, conda does not support Python 3.6 anymore.

Conda/Py3.7 never manages to solve the environment.

Conda/Py3.9 manages to install abricate 0.8, but it won't run:

Can't locate List/MoreUtils.pm in @INC (you may need to install the List::MoreUtils module)

Nor can I install this dependency because one of List::MoreUtils's dependencies is itself broken.

This is bioinformatics purgatory. :rofl:

So I'm using the docker containers. Here's the list of available docker images. Brief instructions for how to do use them:

CURRENT_CONTAINER=quay.io/biocontainers/abricate:1.0.1--ha8f3691_1

# start the container, explore content:
docker run -it --rm  $CURRENT_CONTAINER /bin/bash

# run abricate on file /in_dir/input.gbk
docker run --rm -v /in_dir:/data $CURRENT_CONTAINER abricate --quiet --db plasmidfinder /data/input.gbk
rpetit3 commented 2 years ago

Hello!

I was able to create an abricate environment today without any issues. Conda is on Python 3.7

conda create -n abricate -c conda-forge -c bioconda abricate

I would suggest up check out your base environment. It should be pretty empty with not much installed on it.

conda env export -n base

If your base environment is nice and clean maybe give Mamba a try, since its much faster at solving environments.

mamba create -n abricate -c conda-forge -c bioconda abricate

Cheers

MrTomRod commented 2 years ago

WTF?? I did it exactly like yesterday (well, probably not exactly exactly), and this time it worked!

How I did it:

# uninstall conda
$ rm -rf ~/miniconda3/
# install conda
$ bash Miniconda3-py37_4.10.3-Linux-x86_64.sh
# restart bash
$ which python
/home/username/miniconda3/bin/python
$ python --version
Python 3.7.10
$ conda create -n abricate -c conda-forge -c bioconda abricate
$ conda activate abricate
$ abricate --version
abricate 1.0.1

Tested it with conda/python3.9, too. Again, it worked. I'm bewildered.

Sorry for wasting your time!

rpetit3 commented 2 years ago

Haha no worries @MrTomRod ! Conda can be quite fickle sometimes! Glad you are moving along now!