Plugin error feature-classifier (0.22.2.post1)

Please read the following before posting!

Hello, i have an error when i run the classifier step, i use the native qiime2-2020.2 version in a conda environment, my laptop GB RAM is bigger than 8.

What i run is:

$ qiime feature-classifier classify-sklearn --i-classifier classifier.qza --i-reads rep-seqs.qza --o-classification taxonomy.qza --verbose

And then i get:

Traceback (most recent call last):
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2cli/commands.py”, line 328, in call
results = action(**arguments)
File “</home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/decorator.py:decorator-gen-343>”, line 2, in classify_sklearn
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/action.py”, line 234, in bound_callable
spec.view_type, recorder)
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/sdk/result.py”, line 289, in _view
result = transformation(self._archiver.data_dir)
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/qiime2/core/transform.py”, line 70, in transformation
new_view = transformer(view)
File “/home/ubuntu/miniconda3/envs/qiime2-2020.2/lib/python3.6/site-packages/q2_feature_classifier/_taxonomic_classifier.py”, line 64, in _1
% (sklearn_version, sklearn.version))
ValueError: The scikit-learn version (0.21.2) used to generate this artifact does not match the current version of scikit-learn installed (0.22.2.post1). Please retrain your classifier for your current deployment to prevent data-corruption errors.

Plugin error from feature-classifier:

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

See above for debug info.

So look for scikit-learn version (0.21.2) to install and I can’t to find it, now i think only exist the 0.22.2.post1 verrsion.
I really would apreciete your help. I dont know how to do in this issue. Thanks :worried:

Hi @Crisky!

So the warning message here is just saying that you have one version of scikit-learn installed in your environment (0.22.2.post1), but you are trying to use a pre-trained classifier built using a different version of scikit-learn (0.21.2). For a variety of reasons, we disallow mixing versions like this, because it can lead to all kinds of problems.

Taking a step back - how did you get scikit-learn 0.22.2.post1 installed in your QIIME 2 conda environment? There must’ve been some kind of manual step in there, because QIIME 2 2020.2 currently ships with scikit-learn 0.21.2, and wouldn’t be automatically upgraded unless you either tried to upgrade yourself, or maybe you tried to install some other software in the env?

The quickest way to get moving is to just create a new QIIME 2 environment, it should go pretty fast since you already have the packages downloaded and cached. Once the new env is created, verify the version of scikit-learn installed in it by running:

conda list scikit-learn

:qiime2: