[Python] ModuleNotFoundError in Code Runner, but works fine in terminal

Discussão em 'Python' iniciado por Stack, Julho 20, 2025.

  1. Stack

    Stack Membro Participativo

    When I right click the file in VS Code and click on Run Python File in Terminal - it runs perfectly fine and gives me the desired outputs.

    However, when I click Run Code or Alt+Shift+N it opens up the Output tab next to the terminal and produces no output - just an error message stating that the module flask does not exist.

    I do not understand this, since the Flask package is installed.

    I created the venv and deleted it. It was working fine until yesterday. Now, it's not working unless I run the py file.

    Continue reading...

Compartilhe esta Página