I installed python and was using it with PyCharm For A Couple of Weeks Today I wanted to Swap To Visual Studio Code Because of Some Features. I Created A File and Set It To Python From The Bottom Right Corner, When I Try Running and Debugging It Shows Me An Error Message That Says "FileNotFoundError: [Errno 2] No such file or directory: 'C:\Untitled-1'PS C:> "
We can use cmd terminal and powershell terminal in VS Code.
When we run the code and the VSCode terminal is in the Python interactive window, the terminal displays: "SyntaxError: invalid syntax
": (Because the Python interactive window recognizes Python code, the run button is to execute a command with a path.)
Solution:
Click the green run button in the upper right corner of VS Code:
Or enter "Python" in the terminal to enter the Python interactive window, and then enter the code in the terminal:
For using Python in VS Code you could refer to this document: Python in VS Code.
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments