[Python] Python -- Syntax Error with Forward Slash in Jupyter Lab Terminal

Discussão em 'Python' iniciado por Stack, Janeiro 22, 2025.

  1. Stack

    Stack Membro Participativo

    C:/Users/benja/Python/opencv/build/x64/vc15/bin/opencv_annotation.exe --annotations=positive.txt --images=/PositiveImg/Google/

    When I run this in the Terminal of Jupyter Notebook, it produces a syntax error pointing to the forward slash of C:/:

    File "<python-input-9>", line 1

    C:/Users/benja/Python/opencv/build/x64/vc15/bin/opencv_annotation.exe --annotations=positive.txt --images=/PositiveImg/Google/

    SyntaxError: invalid syntax

    I'm on Windows 10 and using Version 3.4.16 of opencv for the opencv_annotation tool.

    Tried using backslash, but that produced the 'unexpected character after line continuation character' Syntax Error

    Continue reading...

Compartilhe esta Página