使用pip的setup.py中的SyntaxError安装模块 [英] SyntaxError in setup.py with pip to install module

查看:109
本文介绍了使用pip的setup.py中的SyntaxError安装模块的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以我的python老师展示了turtle模块,所以我想自己尝试一下,但是当我尝试在PC上安装turtle模块时,我遇到了一个错误: 我正在使用"pip"安装模块,因此当我在控制台上执行"pip install turtle"时 (不是python控制台)我有一个错误:

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:\Users\Daxxas\AppData\Local\Temp\pip-build-727hpv0w\turtle\setup.py", line40
except ValueError, ve:
                 ^
SyntaxError: invalid syntax

这是红色的:

Command "python setup.py egg_info" failed with error code 1 C:\Users\Daxxas\AppData\Local\temp\pip-build-727hpv0w\turtle\

我不知道该怎么办. 临时"中没有pip的文件夹.

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

那么我该如何解决这个问题以便能够安装turtle模块?

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

ps:是否可以在控制台中复制/粘贴某些内容?

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

推荐答案

Turtle已包含在Python标准库中;您不需要安装任何东西.

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

您正在安装的库是完全不同的东西(显然是HTTP代理),它似乎与任何最新的Python版本都不兼容.

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.

这篇关于使用pip的setup.py中的SyntaxError安装模块的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆