PacificBiosciences / pb-metagenomics-tools

Tools and pipelines tailored to using PacBio HiFi Reads for metagenomics
BSD 3-Clause Clear License
174 stars 35 forks source link

Could not create conda environment from checkm2 #49

Closed melodymale closed 1 year ago

melodymale commented 1 year ago

I'm trying to run this command snakemake --snakefile Snakefile-hifimags.smk --configfile configs/Sample-Config.yaml -c8 --use-conda

But got a problem with create env via checkm2.yml

Here is my log

Config file config.yaml is extended by additional config specified via the command line.
Building DAG of jobs...
Your conda installation is not configured to use strict channel priorities. This is however crucial for having robust and correct environments (for details, see https://conda-forge.org/docs/user/tipsandtricks.html). Please consider to configure strict priorities by executing 'conda config --set channel_priority strict'.
Creating conda environment envs/checkm2.yml...
Downloading and installing remote packages.
CreateCondaEnvironmentException:
Could not create conda environment from /Users/wipoo/pb-metagenomic-tools/HiFi-MAG-Pipeline/envs/checkm2.yml:
Command:
mamba env create --quiet --file "/Users/wipoo/pb-metagenomic-tools/HiFi-MAG-Pipeline/.snakemake/conda/8b0bff0a701061d036f98a34ba683f68_.yaml" --prefix "/Users/wipoo/pb-metagenomic-tools/HiFi-MAG-Pipeline/.snakemake/conda/8b0bff0a701061d036f98a34ba683f68_"
Output:
Could not solve for environment specs
Encountered problems while solving:
  - nothing provides requested _libgcc_mutex 0.1**
  - nothing provides requested _openmp_mutex 4.5**
  - nothing provides requested boost-cpp 1.70.0**
  - nothing provides prodigal >=2.6.3 needed by checkm2-1.0.1-pyh7cba7a3_0
  - nothing provides requested diamond 2.0.4**
  - nothing provides requested keyutils 1.6.1**
  - nothing provides requested ld_impl_linux-64 2.39**
  - nothing provides requested libgcc-ng 12.2.0**
  - nothing provides requested libgfortran-ng 12.2.0**
  - nothing provides requested libgomp 12.2.0**
  - nothing provides requested libnsl 2.0.0**
  - nothing provides requested libstdcxx-ng 12.2.0**
  - nothing provides requested prodigal >=2.6.3

The environment can't be solved, aborting the operation
PeymanDerik commented 1 year ago

Hey, I am getting the same error! Did you figure out how to solve this? Thanks

dportik commented 1 year ago

Hi @MelodyMale and @PeymanDerik , Thanks for your patience. The checkm2 environment recipe might not be robust or there may be an issue with your conda settings.

Let's start by listening to the warning in the conda code:

Your conda installation is not configured to use strict channel priorities. 
This is however crucial for having robust and correct environments (for details, 
see https://conda-forge.org/docs/user/tipsandtricks.html). Please 
consider to configure strict priorities by executing 
'conda config --set channel_priority strict'.

The bioconda, conda-forge, and defaults channels should really be prioritized in that order. Try this and see if it fixes the issue.

Alternatively, you can try a lightweight version of the environment to see if that helps.

Copy/paste this into your checkm2.yml and try again:

name: checkm2_env
channels:
  - bioconda
  - conda-forge
  - defaults
dependencies:
  - checkm2=1.0.1

It may cause the same initial issue, but could be another workaround.

Let me know if you have success with either option.

melodymale commented 1 year ago

@dportik Thank you for your solution, it worked!

dportik commented 1 year ago

Noting that this is now addressed in #54