[Python] Python Error: 'Term is not recognized as cmdlet, function, script file or operable...

Discussão em 'Python' iniciado por Stack, Outubro 2, 2024.

  1. Stack

    Stack Membro Participativo

    So I have a longer file where I took a lot of notes in comments and wrote down examples from class. Instead of running the whole file whenever I want to try some lines of code, I would like to only run a selected section of the code. Whether I use Shift+Enter or Right-click > Run selection I keep running into the same error.

    When I run the whole code, there is no problem. I'm on Windows 10.

    This is the error I get:

    The term 'x' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or
    if a path was included, verify that the path is correct and try again.

    Here is a screenshot:

    Error when running a section of Python code with Shift+Enter

    Can anyone help?

    I have also re-installed both Python and Visual Studio a few times, as well as the extensions within Visual Studio for Python. The error remains the same.

    Continue reading...

Compartilhe esta Página