Open TonyMane opened 3 years ago
Hello, I have the exact same error as above, related to a missing "sklearn.ensemble_forest" module, while trying to run anvi-interactive:
(anvio-master) dhwani@vulcan:~/work/TolmanGEOVIDE-MetaG/genome_recruitment$ anvi-interactive -p BB40_final_assembly_recut-MERGED/PROFILE.db -c BB40_final_assembly_recut-CONTIGS.db --server
-only -P 8082
Traceback (most recent call last):
File "/home/dhwani/MyGit/anvio/bin/anvi-interactive", line 122, in
Here is my Anvio version details: (anvio-master) dhwani@vulcan:~/work/TolmanGEOVIDE-MetaG/genome_recruitment$ anvi-self-test --version Anvi'o .......................................: hope (v7-dev)
Profile database .............................: 35 Contigs database .............................: 20 Pan database .................................: 14 Genome data storage ..........................: 7 Auxiliary data storage .......................: 2 Structure database ...........................: 2 Metabolic modules database ...................: 2 tRNA-seq database ............................: 1
Is there any fix for this? Desai
Thanks and regards,
Dhwani
Dear @TonyMane and @dhwanidesai,
I am not sure why you're getting this error, but this should solve it:
pip install scikit-learn==0.23.2
Please let me know how it goes if you try it.
Dear @TonyMane and @dhwanidesai,
I am not sure why you're getting this error, but this should solve it:
pip install scikit-learn==0.23.2
Please let me know how it goes if you try it.
I ran into the same problem with Anvio 7. After doing it your way, the problem was solved. Thanks very much~
* Anvi'o's self-test is done, and the temporary files are all gone.
or if on conda conda install --force --no-deps -c conda-forge - scikit-learn=0.24.2
the meta.yaml of the conda env has the wrong requirement
made a pull request: https://github.com/merenlab/anvio/issues/1682
missing the bioconda, and used mamba not conda ... mamba install --force --no-deps -c conda-forge -c bioconda scikit-learn=0.24.2
well, basically force install the 0.24.2 scikit-learn version but for conda
I can confirm that installing manually scikit-learn=0.24.2
solves the problem. Thanks @moritzbuck.
However, to work out of the box for installing anvio
from bioconda
, the recipe of anvio-minimal
(https://github.com/bioconda/bioconda-recipes/blob/9f27b72aad38aef18ce4adecd63f3150a31b3b0c/recipes/anvio-minimal/meta.yaml#L28) would need to be adjusted accordingly to reflect to the change in the version because otherwise the error persists when directly installing anvio
from bioconda using conda install anvio
.
Short description of the problem
Getting the following: ModuleNotFoundError: No module named 'sklearn.ensemble._forest'. I tried installing this with pip, which says it can find it. This error occurs when doing 'anvi-self-test', however, it also occurs while doing 'anvi-gen-genomes-storage'.
anvi'o version
(anvio-master) (anvio-master) -bash-4.2$ anvi-self-test --version Anvi'o .......................................: hope (v7-dev)
Profile database .............................: 35 Contigs database .............................: 20 Pan database .................................: 14 Genome data storage ..........................: 7 Auxiliary data storage .......................: 2 Structure database ...........................: 2 Metabolic modules database ...................: 2 tRNA-seq database ............................: 1
System info
Please tell us which operating system you are using, and how did you install anvi'o.
Detailed description of the issue
:: Firing up the interactive interface ...
Traceback (most recent call last):
d = interactive.Interactive(args)
File "/home/abertagnolli3/github/anvio/anvio/interactive.py", line 198, in init
self.completeness = Completeness(self.contigs_db_path)
File "/home/abertagnolli3/github/anvio/anvio/completeness.py", line 45, in init
self.SCG_domain_predictor = scgdomainclassifier.Predict(argparse.Namespace(), run=terminal.Run(verbose=False), progress=self.progress)
File "/home/abertagnolli3/github/anvio/anvio/scgdomainclassifier.py", line 234, in init
SCGDomainClassifier.init(self, args, run, progress)
File "/home/abertagnolli3/github/anvio/anvio/scgdomainclassifier.py", line 73, in init
self.rf.initialize_classifier()
File "/home/abertagnolli3/github/anvio/anvio/learning.py", line 103, in initialize_classifier
classifier_obj = pickle.load(open(self.classifier_object_path, 'rb'))
ModuleNotFoundError: No module named 'sklearn.ensemble._forest'
File "/home/abertagnolli3/github/anvio/bin/anvi-interactive", line 122, in
Config Error: According to the exit code ('1'), anvi'o suspects that something may have gone wrong while running your tests :/ We hope that the reason is clear to you from the lines above. But if you don't see anything obvious, and especially if the test ended up running until the end with reasonable looking final results, you shouldn't worry too much about this error. Life is short and we all can worry just a bit less.
Files to reproduce
If you have no files you can share with us to reproduce the issue, please remove this text and header completely.
If you have files (i.e., a contigs database, a profile database, a BAM file, etc), please put them in a single directory, compress the directory, upload it to Dropbox and share with us a download link here along with instructions on how to reproduce the error.