# error in q2 feature classifier

**URL:** https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093
**Category:** Technical Support
**Created:** [August 15, 2019, 12:54pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093 "2019-08-15T12:54:21Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![kinosha](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@kinosha](https://forum.qiime2.org/u/kinosha)
#### Post date: [August 15, 2019, 12:54pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093/1 "2019-08-15T12:54:21Z")

</div>

Good day

I have tried running q2-feature classifier many ways but it does not seem to work i keep getting this error.

.Plugin error from feature-classifier:

The scikit-learn version (0.19.1) used to generate this artifact does not match the current version of scikit-learn installed (0.21.2). Please retrain your classifier for your current deployment to prevent data-corruption errors.

Debug info has been saved to /tmp/qiime2-q2cli-err-cmr5vmoj.log

Could I please get some assistance, I have tried read similar topic issues but can still not resolve my issue. Please not I have the most recent classifier and I have tried many different versions of qiime2

Thanking you

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [August 16, 2019, 1:20pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093/2 "2019-08-16T13:20:06Z")

</div>

Good morning Kinosha,

I think you are on the right track towards solving this error:

> [@kinosha](#):
>
> Please not I have the most recent classifier and I have tried many different versions of qiime2

You are correct that the version is the issue. To solve this error, you need to install the exact same version of scikit-learn that was used to train the classifiers.

Because you have scikit-learn 0.21.2 installed, you [download matching classifiers here](https://docs.qiime2.org/2019.7/data-resources/).

Let me know if this works for you!  
Colin

---

<div class="post-metadata">

### Author: ![kinosha](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@kinosha](https://forum.qiime2.org/u/kinosha)
#### Post date: [August 19, 2019, 12:44pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093/3 "2019-08-19T12:44:24Z")

</div>

Good day

Thank you for your help, I have however tried updating the classifier but still get the same error, do i perhaps need to run this command first.

conda install --override-channels -c defaults scikit-learn=0.21.2

I have tried with this classifier  
[Silva 132 99% OTUs from 515F/806R region of sequences](https://data.qiime2.org/2019.7/common/silva-132-99-515-806-nb-classifier.qza) (MD5: `a0925e86cda18829f84f03dab01ff589` )

But still get the same error

Thanking you

Kinosha

---

<div class="post-metadata">

### Author: ![colinbrislawn](https://forum.qiime2.org/user_avatar/forum.qiime2.org/colinbrislawn/32/6221_2.png) [@colinbrislawn](https://forum.qiime2.org/u/colinbrislawn)
#### Post date: [August 19, 2019, 12:47pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093/4 "2019-08-19T12:47:22Z")

</div>

Hello Kinosha,

> [@kinosha](#):
>
> do i perhaps need to run this command first.
> 
> conda install --override-channels -c defaults scikit-learn=0.21.2

Yes! That will make sure you have the right version of scikit-learn for the classifier you just downloaded.

Let me know if the `conda` command runs OK and if you can classify your reads after this!

Colin

---

<div class="post-metadata">

### Author: ![kinosha](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@kinosha](https://forum.qiime2.org/u/kinosha)
#### Post date: [August 19, 2019, 3:42pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093/5 "2019-08-19T15:42:41Z")

</div>

Good day

I hoped this would work but I get the same error

I ran  
conda install --override-channels -c d efaults scikit-learn=0.21.2  
Collecting package metadata: done  
Solving environment: done

# All requested packages already installed.

Then I ran

(qiime2-2019.7) [kinosha@wonko:~/qiime]$ qiime feature-classifier classify-sklea rn --i-reads dada2\_rep\_seq.qza --i-classifier /home/kinosha/qiime/silva-132-99- 515-806-nb-classifier.qza --o-classification taxonomy.qza

Plugin error from feature-classifier:

The scikit-learn version (0.19.1) used to generate this artifact does not matc h the current version of scikit-learn installed (0.21.2). Please retrain your cl assifier for your current deployment to prevent data-corruption errors.

Debug info has been saved to /tmp/qiime2-q2cli-err-jv72k5vb.log

I dont know if classifier is a problem

[Silva 132 99% OTUs from 515F/806R region of sequences](https://data.qiime2.org/2019.7/common/silva-132-99-515-806-nb-classifier.qza) (MD5: `a0925e86cda18829f84f03dab01ff589` )

I am not sure what to try now

Thanks

Kinosha

---

<div class="post-metadata">

### Author: ![Nicholas\_Bokulich](https://forum.qiime2.org/user_avatar/forum.qiime2.org/nicholas_bokulich/32/19937_2.png) [@Nicholas\_Bokulich](https://forum.qiime2.org/u/Nicholas_Bokulich)
#### Post date: [August 19, 2019, 4:13pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093/6 "2019-08-19T16:13:59Z")

</div>

> [@kinosha](#):
>
> conda install --override-channels -c d efaults scikit-learn=0.21.2

you did it all backwards: you already have 0.21.2 installed, but are attempting to use a classifier that was trained using sklearn 0.19.1, so that is the version you need to have installed.

If you want to do that, you should do this instead:  
`conda install --override-channels -c d efaults scikit-learn=0.19.1`

_HOWEVER_, **downgrading sklearn is probably a BAD IDEA** , or may not be possible, since much of the other software and dependencies in QIIME 2 2019.7 rely on later versions of sklearn.

A few other suggestions:

1. train your own classifier (see the tutorial in the QIIME 2 online tutorials).
2. install an earlier version of QIIME 2 in a separate environment. Looks like version 2018.6 is the last version that used sklearn=0.19.1! 🕸
3. _at the very least_ clone your 2019.7 environment so that you have a separate environment that you can "tweak" as you like... that way if you accidentally break anything you will still have a pristine working version of 2019.7.

---

<div class="post-metadata">

### Author: ![kinosha](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@kinosha](https://forum.qiime2.org/u/kinosha)
#### Post date: [August 20, 2019, 1:06pm UTC](https://forum.qiime2.org/t/error-in-q2-feature-classifier/11093/7 "2019-08-20T13:06:50Z")

</div>

Thank you both for all your help
