rrwick / Trycycler

A tool for generating consensus long-read assemblies for bacterial genomes
GNU General Public License v3.0
306 stars 28 forks source link

Unable to install through conda (mamba) #70

Closed ASUQ closed 8 months ago

ASUQ commented 8 months ago

While trying to install Trycycler through Conda (Mamba), I encountered the error below.

Environment: CentOS Linux release 8.5.2111 Linux version 4.18.0 Conda version 23.9.0 Mamba version 1.5.6


The following package could not be installed
└─ trycycler is not installable because it requires
   └─ r-phangorn but there are no viable options
      ├─ r-phangorn [2.2.0|2.4.0] would require
      │  └─ r-magrittr but there are no viable options
      │     ├─ r-magrittr 1.5 would require
      │     │  └─ r 3.2.2* , which does not exist (perhaps a missing channel);
      │     ├─ r-magrittr 1.5 would require
      │     │  └─ r 3.3.1* , which conflicts with any installable versions previously reported;
      │     ├─ r-magrittr [1.5|2.0.1|2.0.2|2.0.3] conflicts with any installable versions previously reported;
      │     ├─ r-magrittr 1.5 would require
      │     │  └─ r-base 3.2.0* , which does not exist (perhaps a missing channel);
      │     ├─ r-magrittr 1.5 would require
      │     │  └─ r-base 3.2.1* , which does not exist (perhaps a missing channel);
      │     └─ r-magrittr 1.5 would require
      │        └─ r-base 3.2.2* , which does not exist (perhaps a missing channel);
      └─ r-phangorn [2.10.0|2.11.1|...|2.9.0] conflicts with any installable versions previously reported.```
rrwick commented 8 months ago

I'm not sure what the problem is. The conda install of trycycler works for me, so I'm guessing this is a platform-specific problem 🤷

You could try making a conda environment with just Python:

conda create -n trycycler python=3.10

And then install Trycycler into that environment using pip:

conda activate trycycler
python3 -m pip install git+https://github.com/rrwick/Trycycler.git

That should install Trycycler itself and the Python packages it requires.

Then you could try installing the external tools needed by Trycycler one by one:

conda install miniasm
conda install minimap2
conda install mash
conda install 'muscle<4'
conda install r-phangorn

If and when any fail, you could try to install them manually, either into your conda environment or elsewhere. Based on your error message above, r-phangorn may be the problem.

Let me know how it goes!

ASUQ commented 8 months ago

Thank you for the reply. When I retried to install trycycler today, I found that I was getting warning libmamba Problem type not implemented SOLVER_RULE_STRICT_REPO_PRIORITY and figured out that strict channel_priority was causing the error.

FYI, the command I ran was

conda create -n trycycler -c bioconda -c conda-forge trycycler

and the channel configuration was

--add channels 'defaults'   # lowest priority
--add channels 'bioconda'
--add channels 'conda-forge'   # highest priority

--set channel_priority strict

When I changed the channel_priority into flexible or disabled it, the installation succeeded.

rrwick commented 8 months ago

Glad you got it working! I've also had trouble with strict channel priority (despite it being the official recommendation) and leave mine set to flexible.