Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
883 views
in Technique[技术] by (71.8m points)

python - SyntaxError in setup.py with pip to install module

So my teacher in Python showed the turtle module, so I want to try it myself, but when I try to install the turtle module on my PC I have an error:
I'm using "pip" to install modules, so when I do "pip install turtle" on a console
(not Python console) I have an error :

Collecting turtle
using cached turtle-0.0.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:UsersDaxxasAppDataLocalTemppip-build-727hpv0wurtlesetup.py", line40
except ValueError, ve:
                 ^
SyntaxError: invalid syntax

and there is this in red :

Command "python setup.py egg_info" failed with error code 1 C:UsersDaxxasAppDataLocalemppip-build-727hpv0wurtle

And I don't know what to do. There isn't pip's folder in "Temp".

So how can I fix this to be able to install the turtle module ?

ps : Is it possible to copy/paste something in a console ?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Turtle is already included in the Python standard library; you don't need to install anything.

The library you were installing is a completely different thing (an HTTP proxy, apparently) which looks like it's not compatible with any recent Python version.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...