jtamames / SqueezeMeta

A complete pipeline for metagenomic analysis
GNU General Public License v3.0
348 stars 81 forks source link

Checking all installs #705

Closed bioforkgithub closed 1 year ago

bioforkgithub commented 1 year ago

python3 -c 'import sklearn' NOT OK Missing python library "sklearn"

I have installed the scikit-learn package but still it shows this error on running the test_install.pl

bioforkgithub commented 1 year ago

I tried both the packages mamba as well as the git install

fpusan commented 1 year ago

What's the output when running python3 -c 'import sklearn' inside the activated conda environment?

bioforkgithub commented 1 year ago
  1. micromamba list gives following:

    scikit-learn 0.24.2 py36hc89565f_1 conda-forge scipy 1.5.3 py36h81d768a_1 conda-forge sed 4.8 he412f7d_0 conda-forge setuptools 58.0.4 py36h5fab9bb_2 conda-forge six 1.16.0 pyhd3eb1b0_1 sqlite 3.40.1 h5082296_0 squeezemeta 1.6.2post1 py36pl5262r36h7b7c402_0 fpusan

  2. python3 -c 'import sklearn' gives following:

(SqueezeMeta) [a40540@hod localscratch]$ python3 -c 'import sklearn' Traceback (most recent call last): File "", line 1, in File "/gpfs/gpfs0/home/home2/a40540/micromamba/envs/SqueezeMeta/lib/python3.6/site-packages/sklearn/init.py", line 82, in from .base import clone File "/gpfs/gpfs0/home/home2/a40540/micromamba/envs/SqueezeMeta/lib/python3.6/site-packages/sklearn/base.py", line 17, in from .utils import _IS_32BIT File "/gpfs/gpfs0/home/home2/a40540/micromamba/envs/SqueezeMeta/lib/python3.6/site-packages/sklearn/utils/init.py", line 23, in from .class_weight import compute_class_weight, compute_sample_weight File "/gpfs/gpfs0/home/home2/a40540/micromamba/envs/SqueezeMeta/lib/python3.6/site-packages/sklearn/utils/class_weight.py", line 7, in from .validation import _deprecate_positional_args File "/gpfs/gpfs0/home/home2/a40540/micromamba/envs/SqueezeMeta/lib/python3.6/site-packages/sklearn/utils/validation.py", line 22, in import joblib File "/gpfs/gpfs0/home/home2/a40540/micromamba/envs/SqueezeMeta/lib/python3.6/site-packages/joblib/init.py", line 129, in from .parallel import Parallel File "/gpfs/gpfs0/home/home2/a40540/micromamba/envs/SqueezeMeta/lib/python3.6/site-packages/joblib/parallel.py", line 23, in from contextlib import nullcontext ImportError: cannot import name 'nullcontext'

Even with the error I tried running the pipeline with test data. It ran without error but does it affect the credibility of result???????

fpusan commented 1 year ago

Not sure which package uses scikit, your results are probable fine if there was no error message. Anyways I am working on a Foix for this You can try mamba create -n SqueezeMeta -c conda-forge -c bioconda -c fpusan -c anaconda squeezemeta-dev=1.6.2post2 --no-channel-priority to install the de versiin with the Fox. It should pass the tests in test_install.py. I will do more testing myself and hopefully release the patch next week

bioforkgithub commented 1 year ago

Ok then I will do that next week and try again on the test data. Rightnow I am running it on my data. Waiting for any errors. Will let you know for any error then.

fpusan commented 1 year ago

Yes, I have fixed this in the dev version, install with 

mamba create -n SqueezeMeta -c conda-forge -c bioconda -c anaconda -c fpusan  squeezemeta-dev=1.6.2post2 --no-channel-priority

And then configure with

configure_nodb.pl /path/to/db

I will make an official release later this week after I finish testing, but everything seems to be in order so far... Sobre 11/07/2023 15:32:22, RIJP @.> escribió: Hi, I've got same message from test_install.pl. I think version of scikit-learn is not compatible for python 3.6. When installing squeezemeta with mamba, scikit-learn version 0.24.2 is installed. However this version is not compatible for python 3.6. I tried downgrading scikit-learn to 0.20.2 which is compatible for python 3.6, but failed due to dependency problems. Any solution for this? — Reply to this email directly, view it on GitHub [https://github.com/jtamames/SqueezeMeta/issues/705#issuecomment-1630842082], or unsubscribe [https://github.com/notifications/unsubscribe-auth/ACAHO7X7HI22KLD65K6SE53XPVIWNANCNFSM6AAAAAAZ55I4PQ]. You are receiving this because you commented.Message ID: @.> [33aa4013-75ba-461c-8481-6101d19df998]

RIJP-SU commented 1 year ago

Sorry I should have cheked your dev version befor posting. It worked fine. Thanks.

*I accidentally deleted follwoing message. Applogize for making mess.

Hi, I've got same message from test_install.pl. I think version of scikit-learn is not compatible for python 3.6. When installing squeezemeta with mamba, scikit-learn version 0.24.2 is installed. However this version is not compatible for python 3.6. I tried downgrading scikit-learn to 0.20.2 which is compatible for python 3.6, but failed due to dependency problems. Any solution for this?

fpusan commented 1 year ago

No, it's fine. Dev versions are not normally meant for downloading, sometimes we have some non-working experimental stuff in there

fpusan commented 1 year ago

Should be fixed in ba9a595 and the new release v1.6.2post2

bioforkgithub commented 12 months ago

The execution is complete but i did not get any error messages for scikit. Seems everything is fine. This is from the previous install,not the updated one you mentioned. Will try the next one as well. If any errors, i will keep you posted

fpusan commented 12 months ago

Even if you got no error messages, CONCOCT binning (if requested) may have failed. In that case the pipeline would have progressed using the results from the other binning methods