When we install turtle, the following situations often occur
SyntaxError: invalid syntax
File “…/turtle/setup.py”, line 40
This is because after Python3, except cannot accept statements without ()
How to solve it?
First download the compressed package of turtle-0.0.2.tar.gz from the Internet, unzip it and put it on the desktop after downloading
Open turtle-0.0.2, edit setup.py,
and change except ValueError, ve: to except (ValueError, ve):
Ctrl+s
at line 40, and then install the project interpreter in pycharm. , Or pip install installation in cmd The
installation is successful!