Russel88 / CRISPRCasTyper

CCTyper: Automatic detection and subtyping of CRISPR-Cas operons
https://typer.crispr.dk
MIT License
91 stars 17 forks source link

Fresh install does not work: DistributionNotFound (xgboost) #55

Open samnooij opened 2 months ago

samnooij commented 2 months ago

I just installed CCTyper through conda/mamba and unfortunately it won't run at all. To be precise, I ran the command mamba env create -f cctyper.yaml and the contents of cctyper.yaml are pasted below.

name: cctyper

dependencies:
 - cctyper=1.8.0

channels:
 - conda-forge
 - bioconda
 - russel88

After installing, I activated the environment, and ran cctyper --help or just cctyper, which returns the error:

pkg_resources.DistributionNotFound: The 'nvidia-nccl-cu12; platform_system == "Linux" and platform_machine != "aarch64"' distribution was not found and is required by xgboost

Besides that, I'm getting two deprecation warnings: one that pkg_resources is deprecated (https://setuptools.pypa.io/en/latest/pkg_resources.html) and one that Biopython's Bio.pairwise2 is deprecated and may be replaced by Bio.Align.PairwiseAligner. I'm running Ubuntu 22.04.4 LTS. Any idea how to solve this? Thanks in advance!

-- update 2024-09-13 I just tried versions 1.7.1 and 1.6.4 using the same installation method, and I get the exact same problem.

samnooij commented 2 months ago

I tried another conda environment, created by my colleague, and it works! The CCTyper version is also 1.8.0, but the Python and required library versions are different:

Package not working version working version
Python 3.8.19 3.8.13
numpy 1.24.4 1.23.4
pandas 2.0.3 1.5.1
scipy 1.10.1 1.9.3
biopython 1.83 1.79
multiprocess 0.70.16 0.70.14
scikit-learn 1.3.2 1.1.3
py-xgboost 2.1.1 1.7.1
tqdm 4.66.5 4.64.1

Now since the warnings are from xgboost and biopython I suppose downgrading those two should fix it for now. Maybe the conda recipe can be updated with max versions?

-- edit: Indeed, it works with the conda YAML file below! I only get the pkg_resources is deprecated warning message now.

name: cctyper

dependencies:
 - cctyper=1.8.0
 - biopython=1.79
 - libxgboost=1.7.1
 - py-xgboost=1.7.1

channels:
 - conda-forge
 - bioconda
 - russel88