installing matplotlib with pip code example Example 1: python pip install matplotlib pip install matplotlib Example 2: matplotlib install pip3 install matplotlib