【问题标题】:Command "python setup.py egg_info" failed with error code 1 in C:\Users\kadjo\AppData\Local\Temp\pip-build-p_nzw4hf\turtle\命令“python setup.py egg_info”在 C:\Users\kadjo\AppData\Local\Temp\pip-build-p_nzw4hf\turtle\ 中失败,错误代码为 1
【发布时间】:2017-08-22 11:41:14
【问题描述】:

我尝试安装 turttle 包,我得到了这个错误:

C:\WINDOWS\system32>pip install turtle
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\kadjo\AppData\Local\Temp\pip-build-p_nzw4hf\turtle\setup.py", line 40
    except ValueError, ve:
                         ^
    SyntaxError: invalid syntax

【问题讨论】:

    标签: python-2.7 python-3.x pip


    【解决方案1】:

    turtle 是旧的(最后更新于 2009 年);它肯定是 Python2-only。

    except ValueError, ve: 的语法错误意味着您正在尝试使用 Python3 安装它。要使用 turtle,您肯定需要 Python 2.7。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-13
      • 2021-10-23
      • 2018-05-18
      • 2023-04-01
      • 2016-02-14
      • 2019-06-01
      相关资源
      最近更新 更多