[Python] No module named 'matplotlib' in visual studio 2022 python project

Discussão em 'Python' iniciado por Stack, Março 11, 2025.

  1. Stack

    Stack Membro Participativo

    I am new to python language and I am using Windows. I executed below commands on command prompt:

    python -m pip install matplotlib.
    pip3 install matplotlib


    But VS 2022 is not recognizing the matplotlib.

    Below is the code:

    import matplotlib.pyplot as plt
    import numpy as np

    xpoints = np.array([0, 6])
    ypoints = np.array([0, 250])

    plt.plot(xpoints, ypoints)
    plt.show()


    [​IMG]

    When I verify the installation, it says its already installed:

    C:\Users\Dell>python --version
    Python 3.13.1


    Please help.

    Continue reading...

Compartilhe esta Página