tags: python Development language
python3 png_wh_1.py 02-pNG picture height .png .PNG
File "D:\Python310\lib\site.py", line 93 print(message, file=sys.stderr) SyntaxError: invalid syntax
This error appears in the error caused by the site.py of Python3 calling python3. At present, there are still a lot of agricultural installations in the early Python2 installation package.
At the same time, Python2 and Python3 are installed, and
Python2 can copy a piece of python.exe and pythonw.exe in the folder, and then rename it python2.exe and pythonw2.exe.
Python3 can copy a portion of python.exe and pythonw.exe in the folder, and then rename it Python3.exe and Pythonw3.exe.

Check the related versions of python through python -v, python2 -v, python3 -v, you can see the default python2.7
C: \ Users \ KAI \ Desktop \ MISC Example \ MISC Example \ 01- Pictures Hidden> Python -V
Python 2.7.14
C: \ Users \ KAI \ Desktop \ MISC Example \ MISC Example Questions \ 01- Pictures Hidden> Python2 -V
Python 2.7.14
C: \ Users \ KAI \ Desktop \ MISC Example \ MISC Example \ 01- Pictures Hidden> Python3 -V
Python 3.10.4
C: \ Users \ KAI \ Desktop \ MISC Example \ MISC Example \ 01- Image Writing> Python PNG_WH.PY C: \ Users \ Kai \ Desktop \ MISC Example \ Misc Example \ 02-PNG Picture Width height .png
File "D:\Python310\lib\site.py", line 93
print(message, file=sys.stderr)
^
Syntaxerror: Invalid Syntac: \ Users \ Kai \ Desktop \ MISC Example \ MISC Example \ 01- Image Writing> Python2 PNG_WH_1.py 02-PNG Picture High .png.
File "D:\Python310\lib\site.py", line 93
print(message, file=sys.stderr)
C: \ Users \ KAI \ Desktop \ MISC Example \ MISC Example \ 01- Pictures Hidden> Python3 PNG_WH_1.py 02-PNG Picture High .png
[*] width = 0x2cc
[*] height = 0x2d6
python3 png_wh_1.py 02-pNG picture height .png executes normal
python2 png_wh_1.py 02-pNG picture height .png execution failed
Problem Description Django 3.1.4 When using the MySQL database, when data migration, error: Solution will python Change topython3 Python3 Management.py Makemigrations APP Name Results of the:...
Problem Install Django on the Mac and upload the project, when performing Python Management.py RunServer, an error is wrong, an error is as follows: The reason is because I use PIP3 installed Django (...
Django error: This problem occurs because there is no use of the virtual environment to run this project. the solution: Run this project after entering the virtual environment.s...
Enter the corresponding history.py file, such as E:\Anaconda\Lib\site-packages\pyreadline\lineeditor, and modify line 82 as follows. ...
The homework assigned by the teacher needs to be done with python. I finally completed the installation of python. There were still problems when importing the required requests package. I found a lot...
When running the Django project, the following error appears: wrong reason: The error caused by the Python version cannot be executed with the Python2.x command. Python3 must be used to execute the ab...
Problem description When running the Python script, report the error message below Cause analysis: If you want to write Chinese in Python2's PY file, you must add a row of notes to the file encoding, ...
This error is due to the fact that print in python3 becomes a method that requires parentheses as arguments to pass in values. Today's study of tensorflow has been experiencing this error. What is fru...
There was such an error when I was running a ready-made program on github today.SyntaxError: invalid syntax. Remind that there are illegal statements, oh! According to the error prompt, I found that I...
Error: SyntaxError: invalid syntax Where? Python code to run when an error Way? Python def class if elif for while other statements without adding at the end: the key symbol W...