biocore / empress

A fast and scalable phylogenetic tree viewer for microbiome data analysis
BSD 3-Clause "New" or "Revised" License
48 stars 31 forks source link

Error installing empress in conda/docker container #565

Closed jRaffill closed 1 month ago

jRaffill commented 1 month ago

Hi! I'm trying to install empress in a qiime conda environment, inside of a docker container. I'm getting the following error:

gcc -pthread -B /root/miniconda3/envs/qiime/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /root/miniconda3/envs/qiime/include -fPIC -O2 -isystem /root/miniconda3/envs/qiime/include -fPIC -I/tmp/pip-build-env-p4zy68_c/overlay/lib/python3.9/site-packages/numpy/core/include -I/root/miniconda3/envs/qiime/include/python3.9 -c skbio/metadata/_intersection.c -o build/temp.linux-x86_64-cpython-39/skbio/metadata/_intersection.o
      error: command 'gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for scikit-bio
Failed to build scikit-bio
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (scikit-bio)

Is this a known error or does anybody know how I could fix this?

kwcantrell commented 1 month ago

I am not entirely familiar with Docker but it looks like your docker contain does not contain a gcc compiler. I believe you can install gcc using conda though the conda-forge channel. (i.e. conda install -c conda-forge gcc)

sjanssen2 commented 1 month ago

Most docker containers I have seen so far are based on Ubuntu. Although it is possible to install gcc through conda, I'd recommend you install the build-essential through apt-get, see e.g. https://phoenixnap.com/kb/install-gcc-ubuntu

jRaffill commented 1 month ago

This worked! Thank you!