Hornbein
Gold Member
- 3,390
- 2,747
I installed anaconda3, but the Spyder program that is supposed to run Python fails by going into an infinite loop of "Restarting Kernel." I can however run Python standalone and get a prompt. >>>
Now how to run a file. Here's what happens when I try running from the Python command prompt.
>>> exec(open("c:\users\asus\pf.py").read())
File "<stdin>", line 1
exec(open("c:\users\asus\pf.py").read())
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \uXXXX escape
>>>
I copied that line from Notepad after retyping the line by hand to make sure it had no hidden characters. Same result.
I also tried running from the Windows command prompt. What I got there was "python not found."
Now how to run a file. Here's what happens when I try running from the Python command prompt.
>>> exec(open("c:\users\asus\pf.py").read())
File "<stdin>", line 1
exec(open("c:\users\asus\pf.py").read())
^^^^^^^^^^^^^^^^^^^^^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \uXXXX escape
>>>
I copied that line from Notepad after retyping the line by hand to make sure it had no hidden characters. Same result.
I also tried running from the Windows command prompt. What I got there was "python not found."