[Python] VSCode pylance not detecting matplotlib and mpi4py

Discussão em 'Python' iniciado por Stack, Abril 15, 2025.

  1. Stack

    Stack Membro Participativo

    This is the problem in VSCode:

    import matplotlib.pyplot as plt # Import "matplotlib.pyplot" could not be resolved from sourcePylancereportMissingModuleSource
    from mpi4py import MPI # No name 'MPI' in module 'mpi4py'PylintE0611:no-name-in-module


    However, when I run the code, it works.

    I've done a search and people talk about the interpreter, however:

    [​IMG]

    You can see some part of the pip show matplotlib command and the selected interpreter (3.13.0). And if I open the menu with the options, I can choose between 3.13 and 3.11, being the first one the selected one.

    Continue reading...

Compartilhe esta Página