ValueError: Unable to find binary or script `metaphlan'

Hi all,

I am trying to run the biobakery workflow but run into this issue. I also tried installing metaphlan separately but ran into a libdev guide error situation… Any ideas?

(base) (squirrel) [arh0899@qhimem0014 ~]$ biobakery_workflows wmgx --input ~/Saimiri_shotgun --output ~/squirrel/biobakery_workflow
Traceback (most recent call last):
File “/home/arh0899/squirrel/bin/wmgx.py”, line 132, in
merged_taxonomic_profile, taxonomy_tsv_files, taxonomy_sam_files = shotgun.taxonomic_profile(workflow,
File “/home/arh0899/squirrel/lib/python3.9/site-packages/biobakery_workflows/tasks/shotgun.py”, line 350, in taxonomic_profile
depends=[depend_fastq,TrackedExecutable(“metaphlan”)],
File “/home/arh0899/squirrel/lib/python3.9/site-packages/anadama2/tracked.py”, line 199, in new
real_key = cls.key(key)
File “/home/arh0899/squirrel/lib/python3.9/site-packages/anadama2/tracked.py”, line 689, in key
raise ValueError(
ValueError: Unable to find binary or script `metaphlan’

Hi @Sam_Degregori
As the error is related with the biobakery workflows, it might be better address in the specific subforum: bioBakery workflows - The bioBakery help forum
But, for the separate installation of metaphlan, could you post here the exact error message the installation is reporting?

Hi @aitor.blancomiguez,

Ok will do. And here is the output for both my conda install attempt and pip install of metaphlan:

(squirrel) (base) [arh0899@qhimem0014 ~]$ conda install -c bioconda metaphlan
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 versionsThe following specifications were found to be incompatible with your system:
**> **
> - feature:/linux-64::__glibc==2.17=0
> - feature:|@/linux-64::__glibc==2.17=0

Your installed version is: 2.17

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> (squirrel) (base) [arh0899@qhimem0014 ~]$ pip install metaphlan
> Collecting metaphlan
>   Using cached MetaPhlAn-4.0.3-py3-none-any.whl (1.9 MB)
> Collecting biom-format
>   Downloading biom-format-2.1.12.tar.gz (11.7 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 11.7/11.7 MB 28.7 MB/s eta 0:00:00
>   Installing build dependencies ... done
>   Getting requirements to build wheel ... done
>   Preparing metadata (pyproject.toml) ... done
> Collecting requests
>   Downloading requests-2.28.1-py3-none-any.whl (62 kB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 62.8/62.8 KB 3.0 MB/s eta 0:00:00
> Collecting pandas
>   Downloading pandas-1.5.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (12.2 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 12.2/12.2 MB 21.3 MB/s eta 0:00:00
> Collecting dendropy
>   Downloading DendroPy-4.5.2.tar.gz (15.2 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 15.2/15.2 MB 20.4 MB/s eta 0:00:00
>   Preparing metadata (setup.py) ... done
> Collecting biopython
>   Downloading biopython-1.79-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 17.3 MB/s eta 0:00:00
> Collecting scipy
>   Downloading scipy-1.9.3-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (33.8 MB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 33.8/33.8 MB 22.0 MB/s eta 0:00:00
> Collecting phylophlan
>   Downloading PhyloPhlAn-3.0.3-py3-none-any.whl (91 kB)
>      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 91.7/91.7 KB 2.8 MB/s eta 0:00:00
> Collecting pysam
>   Using cached pysam-0.19.1.tar.gz (3.9 MB)
>   Preparing metadata (setup.py) ... error
>   error: subprocess-exited-with-error
>   
>   × python setup.py egg_info did not run successfully.
>   │ exit code: 1
>   ╰─> [139 lines of output]
>       # pysam: no cython available - using pre-compiled C
>       # pysam: htslib mode is shared
>       # pysam: HTSLIB_CONFIGURE_OPTIONS=None
>       # pysam: (sysconfig) CC=gcc -pthread -B /home/arh0899/miniconda3/compiler_compat
>       # pysam: (sysconfig) CFLAGS=-Wno-unused-result -Wsign-compare -DNDEBUG  -O2 -Wall    -fPIC   -O2   -isystem /home/arh0899/miniconda3/include -I/home/arh0899/miniconda3/include    -fPIC   -O2   -isystem /home/arh0899/miniconda3/include
>       # pysam: (sysconfig) LDFLAGS=-Wl,-rpath,/home/arh0899/miniconda3/lib -Wl,-rpath-link,/home/arh0899/miniconda3/lib -L/home/arh0899/miniconda3/lib -L/home/arh0899/miniconda3/lib -Wl,-rpath,/home/arh0899/miniconda3/lib -Wl,-rpath-link,/home/arh0899/miniconda3/lib -L/home/arh0899/miniconda3/lib
>       checking for gcc... gcc -pthread -B /home/arh0899/miniconda3/compiler_compat
>       checking whether the C compiler works... yes
>       checking for C compiler default output file name... a.out
>       checking for suffix of executables...
>       checking whether we are cross compiling... no
>       checking for suffix of object files... o
>       checking whether we are using the GNU C compiler... yes
>       checking whether gcc -pthread -B /home/arh0899/miniconda3/compiler_compat accepts -g... yes
>       checking for gcc -pthread -B /home/arh0899/miniconda3/compiler_compat option to accept ISO C89... none needed
>       checking for ranlib... ranlib
>       checking for grep that handles long lines and -e... /usr/bin/grep
>       checking for C compiler warning flags... unknown
>       checking for pkg-config... /usr/bin/pkg-config
>       checking pkg-config is at least version 0.9.0... yes
>       checking for special C compiler options needed for large files... no
>       checking for _FILE_OFFSET_BITS value needed for large files... no
>       checking shared library type for unknown-Linux... plain .so
>       checking whether the compiler accepts -fvisibility=hidden... yes
>       checking how to run the C preprocessor... gcc -pthread -B /home/arh0899/miniconda3/compiler_compat -E
>       checking for egrep... /usr/bin/grep -E
>       checking for ANSI C header files... yes
>       checking for sys/types.h... yes
>       checking for sys/stat.h... yes
>       checking for stdlib.h... yes
>       checking for string.h... yes
>       checking for memory.h... yes
>       checking for strings.h... yes
>       checking for inttypes.h... yes
>       checking for stdint.h... yes
>       checking for unistd.h... yes
>       checking for stdlib.h... (cached) yes
>       checking for unistd.h... (cached) yes
>       checking for sys/param.h... yes
>       checking for getpagesize... yes
>       checking for working mmap... yes
>       checking for gmtime_r... yes
>       checking for fsync... yes
>       checking for drand48... yes
>       checking for srand48_deterministic... no
>       checking whether fdatasync is declared... yes
>       checking for fdatasync... yes
>       checking for library containing log... -lm
>       checking for zlib.h... yes
>       checking for inflate in -lz... yes
>       checking for library containing recv... none required
>       checking for bzlib.h... no
>       checking for BZ2_bzBuffToBuffCompress in -lbz2... no
>       configure: error: libbzip2 development files not found
>       
>       The CRAM format may use bzip2 compression, which is implemented in HTSlib
>       by using compression routines from libbzip2 <http://www.bzip.org/>.
>       
>       Building HTSlib requires libbzip2 development files to be installed on the
>       build machine; you may need to ensure a package such as libbz2-dev (on Debian
>       or Ubuntu Linux) or bzip2-devel (on RPM-based Linux distributions or Cygwin)
>       is installed.
>       
>       Either configure with --disable-bz2 (which will make some CRAM files
>       produced elsewhere unreadable) or resolve this error to build HTSlib.
>       checking for gcc... gcc -pthread -B /home/arh0899/miniconda3/compiler_compat
>       checking whether the C compiler works... yes
>       checking for C compiler default output file name... a.out
>       checking for suffix of executables...
>       checking whether we are cross compiling... no
>       checking for suffix of object files... o
>       checking whether we are using the GNU C compiler... yes
>       checking whether gcc -pthread -B /home/arh0899/miniconda3/compiler_compat accepts -g... yes
>       checking for gcc -pthread -B /home/arh0899/miniconda3/compiler_compat option to accept ISO C89... none needed
>       checking for ranlib... ranlib
>       checking for grep that handles long lines and -e... /usr/bin/grep
>       checking for C compiler warning flags... unknown
>       checking for pkg-config... /usr/bin/pkg-config
>       checking pkg-config is at least version 0.9.0... yes
>       checking for special C compiler options needed for large files... no
>       checking for _FILE_OFFSET_BITS value needed for large files... no
>       checking shared library type for unknown-Linux... plain .so
>       checking whether the compiler accepts -fvisibility=hidden... yes
>       checking how to run the C preprocessor... gcc -pthread -B /home/arh0899/miniconda3/compiler_compat -E
>       checking for egrep... /usr/bin/grep -E
>       checking for ANSI C header files... yes
>       checking for sys/types.h... yes
>       checking for sys/stat.h... yes
>       checking for stdlib.h... yes
>       checking for string.h... yes
>       checking for memory.h... yes
>       checking for strings.h... yes
>       checking for inttypes.h... yes
>       checking for stdint.h... yes
>       checking for unistd.h... yes
>       checking for stdlib.h... (cached) yes
>       checking for unistd.h... (cached) yes
>       checking for sys/param.h... yes
>       checking for getpagesize... yes
>       checking for working mmap... yes
>       checking for gmtime_r... yes
>       checking for fsync... yes
>       checking for drand48... yes
>       checking for srand48_deterministic... no
>       checking whether fdatasync is declared... yes
>       checking for fdatasync... yes
>       checking for library containing log... -lm
>       checking for zlib.h... yes
>       checking for inflate in -lz... yes
>       checking for library containing recv... none required
>       checking for bzlib.h... no
>       checking for BZ2_bzBuffToBuffCompress in -lbz2... no
>       configure: error: libbzip2 development files not found
>       
>       The CRAM format may use bzip2 compression, which is implemented in HTSlib
>       by using compression routines from libbzip2 <http://www.bzip.org/>.
>       
>       Building HTSlib requires libbzip2 development files to be installed on the
>       build machine; you may need to ensure a package such as libbz2-dev (on Debian
>       or Ubuntu Linux) or bzip2-devel (on RPM-based Linux distributions or Cygwin)
>       is installed.
>       
>       Either configure with --disable-bz2 (which will make some CRAM files
>       produced elsewhere unreadable) or resolve this error to build HTSlib.
>       Makefile:122: htscodecs.mk: No such file or directory
>       config.mk:2: *** Resolve configure error first.  Stop.
>       Traceback (most recent call last):
>         File "<string>", line 2, in <module>
>         File "<pip-setuptools-caller>", line 34, in <module>
>         File "/tmp/pip-install-r_pqbadb/pysam_a4914f522229490b821adfbdd3f452b0/setup.py", line 375, in <module>
>           htslib_make_options = run_make_print_config()
>         File "/tmp/pip-install-r_pqbadb/pysam_a4914f522229490b821adfbdd3f452b0/setup.py", line 74, in run_make_print_config
>           stdout = subprocess.check_output(["make", "-s", "print-config"])
>         File "/home/arh0899/miniconda3/lib/python3.9/subprocess.py", line 424, in check_output
>           return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
>         File "/home/arh0899/miniconda3/lib/python3.9/subprocess.py", line 528, in run
>           raise CalledProcessError(retcode, process.args,
>       subprocess.CalledProcessError: Command '['make', '-s', 'print-config']' returned non-zero exit status 2.
>       # pysam: htslib configure options: None
>       [end of output]
>   
**>   note: This error originates from a subprocess, and is likely not a problem with pip.**
**> error: metadata-generation-failed**
**> **
**> × Encountered error while generating package metadata.**
**> ╰─> See above for output.**
> 
> note: This is an issue with the package mentioned above, not pip.
> hint: See above for details.
> WARNING: You are using pip version 22.0.4; however, version 22.3 is available.
> You should consider upgrading via the '/home/arh0899/squirrel/bin/python3 -m pip install --upgrade pip' command.
> (squirrel) (base) [arh0899@qhimem0014 ~]$

Usually that problem is related with conda channel inconsistencies, you can try to run conda install -c bioconda -c conda-forge metaphlan

So I tried that and get all these package conflict errors (pasting part of it because it is very long):

Package pypy3.8 conflicts for:
certifi → pypy3.8[version=‘>=7.3.8|>=7.3.9’]
certifi → python[version=‘>=3.7’] → pypy3.8[version=‘7.3.|7.3.8.|7.3.9.*’]

Package libgomp conflicts for:
_openmp_mutex → libgomp[version=‘>=7.3.0|>=7.5.0’]
libgcc-ng → _openmp_mutex[version=‘>=4.5’] → libgomp[version=‘>=7.3.0|>=7.5.0’]

Package brotlipy conflicts for:
urllib3 → brotlipy[version=‘>=0.6.0’]
requests → urllib3[version=‘>=1.21.1,<1.27’] → brotlipy[version=‘>=0.6.0’]The following specifications were found to be incompatible with your system:

  • feature:/linux-64::__glibc==2.17=0
  • feature:/linux-64::__unix==0=0
  • feature:|@/linux-64::__glibc==2.17=0
  • feature:|@/linux-64::__unix==0=0
  • brotlipy → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]
  • cffi → libgcc-ng[version=‘>=9.4.0’] → __glibc[version=‘>=2.17’]
  • conda-package-handling → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]
  • cryptography → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]
  • libffi → libgcc-ng[version=‘>=9.4.0’] → __glibc[version=‘>=2.17’]
  • libgcc-ng → __glibc[version=‘>=2.17’]
  • libstdcxx-ng → __glibc[version=‘>=2.17’]
  • openssl → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]
  • pycosat → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]
  • pysocks → __unix
  • python=3.9 → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]
  • readline → libgcc-ng[version=‘>=9.3.0’] → __glibc[version=‘>=2.17’]
  • ruamel_yaml → libgcc-ng[version=‘>=9.4.0’] → __glibc[version=‘>=2.17’]
  • sqlite → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]
  • tk → libgcc-ng[version=‘>=9.4.0’] → __glibc[version=‘>=2.17’]
  • urllib3 → pysocks[version=‘>=1.5.6,<2.0,!=1.5.7’] → __unix
  • urllib3 → pysocks[version=‘>=1.5.6,<2.0,!=1.5.7’] → __win
  • xz → libgcc-ng[version=‘>=7.5.0’] → __glibc[version=‘>=2.17’]
  • yaml → libgcc-ng[version=‘>=9.4.0’] → __glibc[version=‘>=2.17’]
  • zlib → libgcc-ng[version=‘>=10.3.0’] → __glibc[version=‘>=2.17’]

Your installed version is: 2.17

Note that strict channel priority may have removed packages required for satisfiability.

(squirrel) (base)

I see, it seems that the issue with the library conflicts is quite deep.
I would create a new clean conda environment just for metaphlan 4, as:
conda create -n metaphlan4 -c bioconda -c conda-forge python=3.7

Ok, I’ll try that thanks. and I am assuming I should not try to install biobakery workflows in that same environment then?

Yes, I would keep them in different environments until all the biobakery tools are upgraded to version 4