1. Anuncie Aqui ! Entre em contato fdantas@4each.com.br

[Python] VSCode not resolving installed libraries

Discussão em 'Python' iniciado por Stack, Setembro 13, 2024.

  1. Stack

    Stack Membro Participativo

    VSCode throws errors for both Matplotlib and numpy. Both are installed, I'm running the correct version of Python, and running the code in IDLE works fine. Python is not running virtual environment, and both libraries are installed for version I am running 3.12. Interpreter is selected as 3.12

    I've tried to install both packages from the terminal, but it says both are installed:

    pip install numpy
    pip install matplotlib


    This is my Python script:

    import numpy as np
    import matplotlib as plt


    It gives me these errors in VS Code:

    Import "numpy" could not be resolved Pylance
    Import "matplotlib" could not be resolved from source Pylance


    How can I get numpy and matplotlib to resolve correctly?

    Continue reading...

Compartilhe esta Página