Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installation problem from conda #163

Closed
bvalot opened this issue May 15, 2024 · 7 comments
Closed

Installation problem from conda #163

bvalot opened this issue May 15, 2024 · 7 comments

Comments

@bvalot
Copy link

bvalot commented May 15, 2024

Hello,

I have some problems to install MOB Suite using conda:

ERROR conda.core.link:_execute(945): An error occurred while installing package 'bioconda::mob_suite-3.1.8-pyhdfd78af_1'.
Rolling back transaction: done

LinkError: post-link script failed for package bioconda::mob_suite-3.1.8-pyhdfd78af_1
location of failed script: /home/bvalot3/.local/opt/miniconda3/envs/mobsuite/bin/.mob_suite-post-link.sh
==> script messages <==
<None>
==> script output <==
stdout:
stderr: Traceback (most recent call last):
  File "/home/bvalot3/.local/opt/miniconda3/envs/mobsuite/bin/mob_init", line 6, in <module>
    from mob_suite.mob_init import main
  File "/home/bvalot3/.local/opt/miniconda3/envs/mobsuite/lib/python3.9/site-packages/mob_suite/mob_init.py", line 13, in <module>
    from mob_suite.utils import init_console_logger
  File "/home/bvalot3/.local/opt/miniconda3/envs/mobsuite/lib/python3.9/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/bvalot3/.local/opt/miniconda3/envs/mobsuite/lib/python3.9/site-packages/Bio/SeqUtils/__init__.py)

return code: 1

Here my configuration:

    active environment : mobsuite
    active env location : /home/bvalot3/.local/opt/miniconda3/envs/mobsuite
            shell level : 2
       user config file : /home/bvalot3/.condarc
 populated config files : /home/bvalot3/.condarc
          conda version : 23.11.0
    conda-build version : not installed
         python version : 3.9.18.final.0
                 solver : libmamba (default)
       virtual packages : __archspec=1=skylake
                          __conda=23.11.0=0
                          __glibc=2.36=0
                          __linux=6.1.0=0
                          __unix=0=0
       base environment : /home/bvalot3/.local/opt/miniconda3  (writable)
      conda av data dir : /home/bvalot3/.local/opt/miniconda3/etc/conda
  conda av metadata url : None
           channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                          https://repo.anaconda.com/pkgs/main/noarch
                          https://repo.anaconda.com/pkgs/r/linux-64
                          https://repo.anaconda.com/pkgs/r/noarch
                          https://conda.anaconda.org/bioconda/linux-64
                          https://conda.anaconda.org/bioconda/noarch
                          https://conda.anaconda.org/conda-forge/linux-64
                          https://conda.anaconda.org/conda-forge/noarch
          package cache : /home/bvalot3/.local/opt/miniconda3/pkgs
                          /home/bvalot3/.conda/pkgs
       envs directories : /home/bvalot3/.local/opt/miniconda3/envs
                          /home/bvalot3/.conda/envs
               platform : linux-64
             user-agent : conda/23.11.0 requests/2.31.0 CPython/3.9.18 Linux/6.1.0-20-amd64 debian/12.5 glibc/2.36 solver/libmamba conda-libmamba-solver/23.12.0 libmambapy/1.5.6
                UID:GID : 1000:1000
             netrc file : None
           offline mode : False

@kbessonov1984
Copy link
Collaborator

kbessonov1984 commented May 21, 2024

Hi, try to have the Biopython to version >= 1.80. Inside your conda environment run conda install biopython=1.81 or you can install it via pip3 pip3 install "biopython==1.81". You might need to remove previous biopython version via conda remove biopython. To fix this we would need to release a new conda recipe that would specify min biopython version >=1.80 since this is when the gc_fraction function was first introduced

@bvalot
Copy link
Author

bvalot commented May 22, 2024

Thanks for the reply.
I try the workaround, but get a new error linking to panda

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(945): An error occurred while installing package 'bioconda::mob_suite-3.0.0-py_1'.
Rolling back transaction: done

LinkError: post-link script failed for package bioconda::mob_suite-3.0.0-py_1
location of failed script: /home/bvalot3/.local/opt/miniconda3/envs/mobsuite/bin/.mob_suite-post-link.sh
==> script messages <==
<None>
==> script output <==
stdout:
stderr: Traceback (most recent call last):
  File "/home/bvalot3/.local/opt/miniconda3/envs/mobsuite/bin/mob_init", line 7, in <module>
    from mob_suite.mob_init import main
  File "/home/bvalot3/.local/opt/miniconda3/envs/mobsuite/lib/python3.12/site-packages/mob_suite/mob_init.py", line 8, in <module>
    from mob_suite.blast import BlastRunner
  File "/home/bvalot3/.local/opt/miniconda3/envs/mobsuite/lib/python3.12/site-packages/mob_suite/blast/__init__.py", line 9, in <module>
    from pandas.io.common import EmptyDataError
ImportError: cannot import name 'EmptyDataError' from 'pandas.io.common' (/home/bvalot3/.local/opt/miniconda3/envs/mobsuite/lib/python3.12/site-packages/pandas/io/common.py)

return code: 1

()

@kbessonov1984
Copy link
Collaborator

kbessonov1984 commented May 23, 2024

Now it seems that you are installing mob_suite version 3.0.0 which does not support pandas > 2.0. For mob-suite version 3.0.0 you need pandas 1.0.5. I would recommend using the newest version of mob-suite which is 3.1.8. Install it via conda/mamba and then update to the biopython package to >= 1.80 via pip3 as with conda it will try to solve all dependencies and would then downgrade mob-suite.

I am working on new build for version 3.1.8 that would restrict biopython version as a permanent fix for now. Also working on a new release 3.1.9 that would also have this issue fixed

@bvalot
Copy link
Author

bvalot commented May 24, 2024

Hello,

It seems that 3.1.8 version could only be install on python 3.12

(mobsuite) bvalot3@hp7490-bv:~$ conda install -c bioconda mob_suite=3.1.8
Channels:
 - bioconda
 - defaults
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: | warning  libmamba Added empty dependency for problem type SOLVER_RULE_UPDATE
failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package mob_suite-3.1.8-pyhdfd78af_0 requires pandas >=0.22.0,<2, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
├─ mob_suite 3.1.8**  is installable and it requires
│  └─ pandas [>=0.22,<=1.5.3 |>=0.22.0,<2 ] with the potential options
│     ├─ pandas [0.22.0|0.23.0|...|0.24.2] would require
│     │  └─ python [2.7* |>=2.7,<2.8.0a0 ], which can be installed;
│     ├─ pandas [0.22.0|0.23.0|...|0.23.4] would require
│     │  └─ python [3.5* |>=3.5,<3.6.0a0 ], which can be installed;
│     ├─ pandas [0.22.0|0.23.0|...|1.1.5] would require
│     │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│     ├─ pandas [0.23.2|0.23.3|...|1.3.5] would require
│     │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│     ├─ pandas [0.24.2|0.25.3|...|1.5.3] would require
│     │  └─ python >=3.8,<3.9.0a0 , which can be installed;
│     ├─ pandas [1.1.3|1.1.4|...|1.5.3] would require
│     │  └─ python >=3.9,<3.10.0a0 , which can be installed;
│     ├─ pandas 1.3.0 would require
│     │  └─ python >=3.7.1,<3.8.0a0 , which can be installed;
│     ├─ pandas [1.3.4|1.3.5|...|1.5.3] would require
│     │  └─ python >=3.10,<3.11.0a0 , which can be installed;
│     ├─ pandas [1.5.1|1.5.2|1.5.3] would require
│     │  └─ python >=3.11,<3.12.0a0 , which can be installed;
│     └─ pandas 0.22.0 would require
│        └─ python 3.6* , which can be installed;
└─ pin-1 is not installable because it requires
   └─ python 3.12.* , which conflicts with any installable versions previously reported.

Pins seem to be involved in the conflict. Currently pinned specs:
 - python 3.12.* (labeled as 'pin-1')

@bvalot
Copy link
Author

bvalot commented May 24, 2024

If I make conda env with python 3.12, I get same message when try to install the 3.1.8 mob_suite version.

@kbessonov1984
Copy link
Collaborator

kbessonov1984 commented May 24, 2024

Hello,

There seems to be an issue with channels as pandas <2 is required and can not be installed. The error message reads:
package mob_suite-3.1.8-pyhdfd78af_0 requires pandas >=0.22.0,<2, but none of the providers can be installed

Try to install the latest build 1 in a fresh clean environment by simply running conda install bioconda::mob_suite which will pick the latest release and build. You can install manually pandas <2

Here is a conda recipe with minimum requirements (in run section)
https://github.com/bioconda/bioconda-recipes/blob/master/recipes/mob_suite/meta.yaml

@kbessonov1984
Copy link
Collaborator

kbessonov1984 commented May 27, 2024

I hope it worked for you, we are releasing this week new conda build and perhaps a new version with guaranteed contig ordering independent of input issue #160 and asking for biopython >= 1.80 solving your issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants