ModuleNotFoundError: No module named 'matplotlib_venn'

Hi all,

I am using JupyterLab with Python 3.9 as the kernel.

I am trying this code:

# Import the library
import matplotlib.pyplot as plt
from matplotlib_venn import venn3
# Custom text labels: change the label of group A
v=venn3(subsets = (10, 8, 22, 6,9,4,2), set_labels = ('Group A', 'Group B', 'Group C'))
v.get_label_by_id('A').set_text('My Favourite group!')

But it returns an error:
ModuleNotFoundError: No module named ‘matplotlib_venn’

Then I go to terminal and activate my conda to type:

conda install matplotlib_venn

It returns this:

PackagesNotFoundError: The following packages are not available from current channels:

  - matplotlib_venn

Current channels:


To search for alternate channels that may provide the conda package you're
looking for, navigate to

What should I do?

I want to plot venn diagram.


You can install it from conda-forge:

conda install -c conda-forge matplotlib-venn

Or from pypi:

pip install matplotlib-venn
1 Like

Thanks it works