CGATOxford / UMI-tools

Tools for handling Unique Molecular Identifiers in NGS data sets
MIT License
493 stars 190 forks source link

Error in installing with conda: solving environment #600

Closed AmirhosseinQ1 closed 9 months ago

AmirhosseinQ1 commented 1 year ago

I have tried to install umi_tools with pip and conda but none of them result in installation. by installing with conda, every time it can't pass the "solving environment" step. I have tried different solutions like updating conda but it didn't work.

sebastian-luna-valero commented 1 year ago

What if you try:

cd /working/folder
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p conda-install
source conda-install/etc/profile.d/conda.sh 
conda install mamba -c conda-forge --yes
mamba create -n umi_tools -c conda-forge -c bioconda umi_tools
conda activate umi_tools
umi_tools --help

I think the channel order is wrong in https://umi-tools.readthedocs.io/

AmirhosseinQ1 commented 1 year ago

after running mamba create -n umi_tools -c conda-forge -c bioconda umi_tools I got this error:

Traceback (most recent call last):
  File "/home/z/Ghorbanpour-sc/conda-install/bin/mamba", line 7, in <module>
    from mamba.mamba import main
  File "/home/z/Ghorbanpour-sc/conda-install/lib/python3.11/site-packages/mamba/mamba.py", line 49, in <module>
    import libmambapy as api
  File "/home/z/Ghorbanpour-sc/conda-install/lib/python3.11/site-packages/libmambapy/__init__.py", line 7, in <module>
    raise e
  File "/home/z/Ghorbanpour-sc/conda-install/lib/python3.11/site-packages/libmambapy/__init__.py", line 4, in <module>
    from libmambapy.bindings import *  # noqa: F401,F403
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 
ImportError: /home/z/Ghorbanpour-sc/conda-install/lib/python3.11/site-packages/libmambapy/../../../libmamba.so.2: undefined symbol: archive_read_support_filter_zstd
IanSudbery commented 1 year ago

It really shouldn't have been neccessary to install a whole fresh version of conda! Although it can be nececssary to create a new enivronment within your conda to get umi_tools working as there are a couple of dependencies, notably pysam and htslib that require specific versions, and other tools often require specific version, and if those two things are incompatiable, there is often a problem!

In the particular error here, it seems this is a problem caused by mamba, which is the fast dropin replacemend for the conda command. Apparently, with mamba, the defualt anaconda channels and conda-forge channel are no longer compatible. There are two ways to fix this.

Firstly, you could just use conda, rather than mamba, so the install command is

$ conda create -n umi_tools -c conda-forge -c bioconda umi_tools

alternatively, you can disable the default channels in mamaba:

$ mamba create -n umi_tools -c nodefaults -c conda-forge -c bioconda umi_tools
AmirhosseinQ1 commented 1 year ago

by replacing mamba with conda it successfully installed