An unexpected error has occurred: cannot import name 'VectorPlotter' from 'seaborn._core'

Hello,

I have been using qiime2 for a while without issues. I tried to set up a Jupyter notebook to use qiime2 API with it and could not figure it out. I guess I must have messed something up in the process because when I gave up and went back to using cli, this error popped up regardless of what qiime command I put in.

I have been using qiime2-2022.8, natively installed with conda on a WSL (Windows 10).

Here is the code and error:

(qiime2-2022.8) [email protected]:/mnt/c/Users/dzagal3/Desktop/dzagal3/0_PhD_Microbiome/1_NGS/Data_Processing/qiime_data_v4$ qiime tools import \

--input-path Input_Files/Fungi_Files/taxa_table.biom
--type 'FeatureTable[Frequency]'
--input-format BIOMV100Format
--output-path Input_Files/Fungi_Files/feature_table.qza
Traceback (most recent call last):
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2cli/builtin/tools.py", line 157, in import_data
artifact = qiime2.sdk.Artifact.import_data(type, input_path,
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/qiime2/sdk/result.py", line 265, in import_data
view_type = qiime2.sdk.parse_format(view_type)
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/qiime2/sdk/util.py", line 88, in parse_format
pm = qiime2.sdk.PluginManager()
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 67, in new
self._init(add_plugins=add_plugins)
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/qiime2/sdk/plugin_manager.py", line 105, in _init
plugin = entry_point.load()
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/pkg_resources/init.py", line 2471, in load
return self.resolve()
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/pkg_resources/init.py", line 2477, in resolve
module = import(self.module_name, fromlist=['name'], level=0)
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2_feature_table/init.py", line 12, in
from ._summarize import (summarize, tabulate_seqs)
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2_feature_table/_summarize/init.py", line 9, in
from ._visualizer import (summarize, tabulate_seqs)
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/q2_feature_table/_summarize/_visualizer.py", line 16, in
import seaborn as sns
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/seaborn/init.py", line 5, in
from .relational import * # noqa: F401,F403
File "/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/seaborn/relational.py", line 8, in
from ._core import (
ImportError: cannot import name 'VectorPlotter' from 'seaborn._core' (/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/seaborn/_core/init.py)

An unexpected error has occurred:

cannot import name 'VectorPlotter' from 'seaborn._core' (/home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages/seaborn/_core/init.py)

Here is what I have done to try to solve it:

  • Searched the error on the forum and nothing came up, although there seem to be a common issue with seaborn and python(?) when searching on Google.
  • Updated conda, but everything was up to date.
  • Tried to reinstall seaborn with pip, but requirements were already satisfied:

(qiime2-2022.8) [email protected]:/mnt/c/Users/dzagal3/Desktop/dzagal3/0_PhD_Microbiome/1_NGS/Raw_Data/DZ_processing_Oct2022/Miseq640_Daniel_Zagal_28299_ITS-249135893$ pip install seaborn
Requirement already satisfied: seaborn in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (0.12.0)
Requirement already satisfied: pandas>=0.25 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from seaborn) (1.4.4)
Requirement already satisfied: matplotlib>=3.1 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from seaborn) (3.5.2)
Requirement already satisfied: numpy>=1.17 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from seaborn) (1.23.1)
Requirement already satisfied: fonttools>=4.22.0 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from matplotlib>=3.1->seaborn) (4.25.0)
Requirement already satisfied: kiwisolver>=1.0.1 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from matplotlib>=3.1->seaborn) (1.4.2)
Requirement already satisfied: pillow>=6.2.0 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from matplotlib>=3.1->seaborn) (9.2.0)
Requirement already satisfied: python-dateutil>=2.7 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from matplotlib>=3.1->seaborn) (2.8.2)
Requirement already satisfied: cycler>=0.10 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from matplotlib>=3.1->seaborn) (0.11.0)
Requirement already satisfied: pyparsing>=2.2.1 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from matplotlib>=3.1->seaborn) (3.0.9)
Requirement already satisfied: packaging>=20.0 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from matplotlib>=3.1->seaborn) (21.3)
Requirement already satisfied: pytz>=2020.1 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from pandas>=0.25->seaborn) (2022.1)
Requirement already satisfied: six>=1.5 in /home/dzagal/miniconda3/envs/qiime2-2022.8/lib/python3.8/site-packages (from python-dateutil>=2.7->matplotlib>=3.1->seaborn) (1.16.0)

I am almost certain I must have inadvertently changed something while trying to troubleshoot importing qiime on a Jupyter notebook. I apologize, I cannot recall everything I did while trying this, but I hope it hints at what may be the problem.

Thanks,

Daniel

Hello @Daniel_Zagal, your best bet is probably to remove your conda environment and recreate it if you haven't already tried that. If you have already tried that, or you try it now and it doesn't work, let us know.

Thank you. I was not sure how far back I had to go to amend this issue. In the end I removed and reinstalled miniconda completely from my WSL. All is working properly now.

1 Like

Unfortunate that you had to go that far, but reinstalling things does solve a lot of difficult-to-diagnose issues! Glad you got it fixed.

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.