# update scikit-learn version

**URL:** https://forum.qiime2.org/t/update-scikit-learn-version/15804
**Category:** User Support
**Created:** [July 22, 2020, 9:23am UTC](https://forum.qiime2.org/t/update-scikit-learn-version/15804 "2020-07-22T09:23:34Z")
**Posts on this page:** 1
**Showing post:** 4

<div class="post-metadata">

### Author: ![thermokarst](https://forum.qiime2.org/letter_avatar_proxy/v4/letter/t/8e7dd6/32.png) [@thermokarst](https://forum.qiime2.org/u/thermokarst)
#### Post date: [July 22, 2020, 3:33pm UTC](https://forum.qiime2.org/t/update-scikit-learn-version/15804/4 "2020-07-22T15:33:30Z")

</div>

Hey @rparadiso!

I will address this by answering some of the questions raised by @the_dummy & @devonorourke:

> [@the\_dummy](#):
>
> Which q2 version did you use to train your classifier

Check this part of the error message to see which version the classifier was trained with:

> [@rparadiso](#):
>
> The scikit-learn version (0.23.1) used to generate this artifact

> [@the\_dummy](#):
>
> you can perform your analysis with the q2 version you have trained your classifier with.

This is the right answer: if you're using an old version of QIIME 2 (which you might be, @rparadiso), then you just need to use the version of the pretrained classifier that was released with that version of QIIME 2. The easiest way to do that is to go to [docs.qiime2.org](http://docs.qiime2.org), and in the upper left, select the version of QIIME 2 you are using, then navigate to the "Data resources" link.

> [@devonorourke](#):
>
> Will sklean _fail_ just because there are different versions?

No, this error is generated (deliberately) by q2-feature-classifier, not scikit-learn.

> [@devonorourke](#):
>
> Any chance this kind of error message can just be a warning, but not kill the process?

No, because the underlying sklearn model can change between versions. Worst-case scenario, if we didn't let q2-feature-classifer error out, you could see classification results that _appear_ to have run successfully, but in fact have produced incorrect results (we call this a data-integrity bug - think "uh oh, I need to retract a paper" sort of issue). That scenario isn't super likely IMO, a more likely situation is that sklearn would just crash, potentially with a less clear error message.

We hope that one day scikit-learn will have portable serializations of their classifier models, which would make this process a little bit smoother, but no clue if that is even on their radar.

BTW, this is a useful read relevant to this discussion - [scikit-learn: machine learning in Python](https://scikit-learn.org/stable/modules/model_persistence.html#security-maintainability-limitations)

---

_[View the full topic](https://forum.qiime2.org/t/update-scikit-learn-version/15804)._
