Home > OS >  Terminal execute Python make a mistake, I don't know how to adjust
Terminal execute Python make a mistake, I don't know how to adjust

Time:10-02

: Python: can 't open the file' 1. Py ': [2] Errno No to the file or directory

Don't know points plates have wrong

CodePudding user response:

Use python2 to perform python3 syntax, certainly wrong

CodePudding user response:

reference 1/f, you drink candle response:
to perform with python2 python3 syntax, certainly wrong

Hello, could you tell me how do you see that it is Python3?

CodePudding user response:

The
refer to the original poster Mujinanzhang response:
: Python: can 't open the file' 1. Py ': [2] Errno No to the file or directory

Don't know points plates have wrong

I looked behind a variety of answer, I found is a path out of the question
CD \ path, and then input the python 1. Py can
Or directly input python and then drag the file to the terminal
One question don't understand, why path is wrong

CodePudding user response:

Python3 print with parentheses,
Python2 print without brackets
There are many other differences between

Couldn't find the file of the problem is very simple and common, is the path to write wrong, using relative path it is necessary to define the relative position of the current and the target file,

CodePudding user response:

reference 4 floor you drink candle response:
python3 print with parentheses,
Python2 print without brackets
There are many other differences between

Can't find the file of the problem is very simple and common, is the path to write wrong, using relative path it is necessary to define the relative position of the current and the target file,

See reply so late, thank you for your answer!
  • Related