merenlab / anvio

An analysis and visualization platform for 'omics data
http://merenlab.org/software/anvio
GNU General Public License v3.0
413 stars 142 forks source link

[BUG] Installing Anvio-8 - error failed building wheel for anvio #2284

Closed rpeguil closed 2 weeks ago

rpeguil commented 2 weeks ago

Short description of the problem

I can't install anvio-8 because of an error when building wheels for anvio and connection-pool.

System info

System version: Ubuntu 22.04.4 LTS I tried to install anvio-8 following the tutorial: https://anvio.org/install/linux/stable/

Detailed description of the issue

I followed the tutorial to install anvio-8. Mamba was successfully installed, but the following command had to be installed using conda instead of mamba:

mamba install -y -c conda-forge -c bioconda python=3.10 \
        sqlite prodigal idba mcl muscle=3.8.1551 famsa hmmer diamond \
        blast megahit spades bowtie2 bwa graphviz "samtools>=1.9" \
        trimal iqtree trnascan-se fasttree vmatch r-base r-tidyverse \
        r-optparse r-stringi r-magrittr bioconductor-qvalue meme ghostscript

mamba install -y -c bioconda fastani

My issue comes with the pip command. Several wheels couldn't be build. I resolved it for several tools, like for stopit, ete3 or illumina-utils following reported issue resolution using: conda install illumina-utils

Still, the issue persists for anvio and connection-pool. I get the following error message (file attached - too long) anvio8_issue.txt

Following issue report #796, i tried the following command: sudo apt-get install python-dev

but get the error:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package python-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  python2-dev:i386 python2:i386 python2-dev python2 python-dev-is-python3

E: Package 'python-dev' has no installation candidate

I then used: sudo apt-get install python-dev-is-python3

And it worked, but when opening a new terminal and trying again the pip, the same error remains for anvio and connection-pool.

Thanks for your feedback

rpeguil commented 2 weeks ago

It may be worth mentioning that anvio-7 is already installed on my system, but I want to add anvio-8.

meren commented 2 weeks ago

Hi @rpeguil, I just tried to reproduce this error by installing everything from scratch, but I failed as everything worked fine :/ One thing I noticed is the fact that your pip command satisfied dependencies from outside (such as from your native system) like shown below:

Requirement already satisfied: numpy<=1.24 in /usr/lib/python3/dist-packages

This shouldn't happen in a virtual environment -- are you sure you run the pip command within the anvio-8 conda environment? Either way, please remove anvio-8 environment, and restart everything please. I hope it will run this time.

rpeguil commented 2 weeks ago

Hi, I deleted my anvio-8 environment and restarted the installation from scratch, but I still have the same issues. I have such lines: Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from paste->anvio==8) (59.6.0)

But for me I am in anvio-8 environment... I activated it using the command line:

(base) odin@odin-PowerEdge-T620:~$ conda activate anvio-8
(anvio-8) odin@odin-PowerEdge-T620:~$
rpeguil commented 2 weeks ago

I checked which python my current env is using and it seems to be ok. The issue of path appears only when using the pip command.

(anvio-8) odin@odin-PowerEdge-T620:~$ which python
/home/odin/anaconda3/envs/anvio-8/bin/python
rpeguil commented 2 weeks ago

I finally solved the problem. No matter what I did, the pip command always used the wrong python path. Only the command below solved the problem. Anvio-8 is now installed and working correctly. sudo $(which pip) install anvio-8.tar.gz

I hope this will help other people with the same problem.