phac-nml / mob-suite

MOB-suite: Software tools for clustering, reconstruction and typing of plasmids from draft assemblies
Apache License 2.0
118 stars 31 forks source link

Conda instalation fails #143

Closed andreaniml closed 1 year ago

andreaniml commented 1 year ago

Hi

I am trying to update my mob-suite instalation and am getting this error while trying to do so or when creating a fresh environment with "conda create -n mobsuite2023 -c bioconda mob_suite":

LinkError: post-link script failed for package bioconda::mob_suite-3.1.4-pyhdfd78af_0
location of failed script: /home/malu/anaconda3/envs/mobsuite2023/bin/.mob_suite-post-link.sh
==> script messages <==
<None>
==> script output <==
stdout:
stderr: Traceback (most recent call last):
  File "/home/malu/anaconda3/envs/mobsuite2023/bin/mob_init", line 7, in <module>
    from mob_suite.mob_init import main
  File "/home/malu/anaconda3/envs/mobsuite2023/lib/python3.8/site-packages/mob_suite/mob_init.py", line 13, in <module>
    from mob_suite.utils import init_console_logger
  File "/home/malu/anaconda3/envs/mobsuite2023/lib/python3.8/site-packages/mob_suite/utils.py", line 2, in <module>
    from Bio.SeqUtils import gc_fraction
ImportError: cannot import name 'gc_fraction' from 'Bio.SeqUtils' (/home/malu/.local/lib/python3.8/site-packages/Bio/SeqUtils/__init__.py)

return code: 1

()

From what I got by searching the other issues is that this error is related to the biopython version, I think the conda is taking the wrong biopython version, but the specified version from the package listing seems to be at least 1.8 (conda-forge/linux-64::biopython-1.81-py38h1de0b5d_0).

I am also having problems in updating my anaconda instalation, so it is probably a problem on my end, but I wanted to check if this was the case.

andreaniml commented 1 year ago

Hi, I've identified the problem, but I don't know how to solve it:

For me, when I try to create an environment conda create -n mobisuiteNew -c bioconda mob_suite it fetches mob-suite 3.1.4, however it installs biopython 1.79 and then the mob-suite instalation fails.

However, if I try to install first biopython 1.81 and then mob-suit, it keeps solving the environment indefinitely. Moreover, sometimes I get a "conda.core.link:_execute(952)" error message too.

kimTina321 commented 1 year ago

I also had similar installation fail. My error message is "ERROR conda.core.link:_execute(745): An error occurred while installing package 'bioconda::mob_suite-3.1.5-pyhdfd78af_0'. " I both tried with mamba too, and it had the same error message.

jrober84 commented 1 year ago

The conda recipe needs to be updated to include the >=1.8 requirement for biopython. This will be corrected in the next release, thank you fo highlighting the issue