Home > other >  For python is a great god solve this mistake what do you mean what should I do
For python is a great god solve this mistake what do you mean what should I do

Time:11-23

>> & C:/Users/PC/AppData/Local/designed/Python/Python38/Python. Exe C:/Users/PC/Desktop/test/test1. Py
The File "& lt; Stdin>" , the line 1
& C:/Users/PC/AppData/Local/designed/Python/Python38/Python. Exe C:/Users/PC/Desktop/test/test1. Py
^
SyntaxError: invalid syntax

CodePudding user response:

Grammatical errors, you run a script in python command line command, you withdraw from the python command line, CD directly to your project directory and run the python test. Py

CodePudding user response:

You are python shell try to run in the system command so would be an error,
Need you to: to understand the python shell and system differences and relationship between terminal
Can I reference (specifically help you rearrange the) :
Python shell is not system, terminal Python beginner, small white common errors and problems
The:
The Python shell, the system and the terminal Python beginner, small white common errors and problems

After the play:
Solution:
Put you to run the command, system terminal is Windows CMD to run here, can,

In addition, it looks like you just to run py file here, no need to specify the corresponding python parser, if the environment variable is set, run directly:
 python c:/Users/PC/Desktop/test/test1. Py 

Can,

CodePudding user response:

C:/Users/PC/AppData/Local/designed/Python/Python38/Python. Exe C:/Users/PC/Desktop/test/test1. Py knock directly inside the CMD command rather than inside the Python shell tapping, directly inside the Windows CMD then C:/Users/PC/AppData/Local/designed/Python/Python38/Python. Exe C:/Users/PC/Desktop/test/test1. Py
Don't be CMD - & gt; Python - & gt; C:/Users/PC/AppData/Local/designed/Python/Python38/Python. Exe C:/Users/PC/Desktop/test/test1. Py
  • Related