[Python] Running python script in command prompt: syntax error unexpected character after line...

Discussão em 'Python' iniciado por Stack, Agosto 24, 2025.

  1. Stack

    Stack Membro Participativo

    I'm new to Python and have been trying to run a Python script through the cmd terminal (after invoking Python 3.6 in the Anaconda 4.3 distribution). I've looked through various forums which have outlined how to do this. I tried entering the following into the command prompt:

    C:\Users\myname\Anaconda3\python.exe C:\Users\myname\Desktop\test.py


    However, I get the error "unexpected character after line continuation character". I got the same error when I tried to enter both pathnames separately as well. The reason I want to use the Anaconda distribution is because it has tensorflow installed on it. Thanks!

    Continue reading...

Compartilhe esta Página