【Python】turtle安装报错ERROR: Command errored out with exit status 1

今天在学python100days经典教程,第一天安个turtle报错了

PS C:\00Freedom\LearningPractice\Python\Python-100-Days\001>  pip install  turtle
Collecting turtle
  Using cached turtle-0.0.2.tar.gz (11 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-unj78cbn\\turtle\\setup.py'"'"'; __file__='"'"'C:\\Users\\ADMINI~1\\AppData\\Local\\Temp\\pip-install-unj78cbn\\turtle\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-unj78cbn\turtle\pip-egg-info'
         cwd: C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-unj78cbn\turtle\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "", line 1, in 
      File "C:\Users\ADMINI~1\AppData\Local\Temp\pip-install-unj78cbn\turtle\setup.py", line 40
        except ValueError, ve:
                         ^
    SyntaxError: invalid syntax
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

最终咋解决?
下载本地安装
turtle下载链接
然后通过对应目录安装

pip install D:\turtle-0.0.2

日志

PS D:\Python\Python-100-Days\001>  pip install  D:\turtle-0.0.2
Processing D:\turtle-0.0.2
Collecting Twisted>=8.0.1
  Downloading Twisted-19.10.0-cp37-cp37m-win_amd64.whl (3.1 MB)
     |████████████████████████████████| 3.1 MB 218 kB/s
Collecting PyYAML>=3.0.8
  Downloading PyYAML-5.3-cp37-cp37m-win_amd64.whl (215 kB)
     |████████████████████████████████| 215 kB 273 kB/s
Collecting hyperlink>=17.1.1
  Downloading hyperlink-19.0.0-py2.py3-none-any.whl (38 kB)
Collecting attrs>=17.4.0
  Downloading attrs-19.3.0-py2.py3-none-any.whl (39 kB)
Collecting zope.interface>=4.4.2
  Downloading zope.interface-4.7.1-cp37-cp37m-win_amd64.whl (134 kB)
     |████████████████████████████████| 134 kB 187 kB/s
Collecting Automat>=0.3.0
  Downloading Automat-20.2.0-py2.py3-none-any.whl (31 kB)
Collecting constantly>=15.1
  Downloading constantly-15.1.0-py2.py3-none-any.whl (7.9 kB)
Collecting PyHamcrest>=1.9.0
  Downloading PyHamcrest-2.0.0-py3-none-any.whl (51 kB)
     |████████████████████████████████| 51 kB 38 kB/s
Collecting incremental>=16.10.1
  Downloading incremental-17.5.0-py2.py3-none-any.whl (16 kB)
Collecting idna>=2.5
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 158 kB/s
Requirement already satisfied: setuptools in c:\program files\python\python37\lib\site-packages (from zope.interface>=4.4.2->Twisted>=8.0.1->turtle==0.0.2) (40.8.0)
Requirement already satisfied: six in c:\users\administrator\appdata\roaming\python\python37\site-packages (from Automat>=0.3.0->Twisted>=8.0.1->turtle==0.0.2) (1.12.0)
Installing collected packages: idna, hyperlink, attrs, zope.interface, Automat, constantly, PyHamcrest, incremental, Twisted, PyYAML, turtle
    Running setup.py install for turtle ... done
Successfully installed Automat-20.2.0 PyHamcrest-2.0.0 PyYAML-5.3 Twisted-19.10.0 attrs-19.3.0 constantly-15.1.0 hyperlink-19.0.0 idna-2.9 incremental-17.5.0 turtle-0.0.2 zope.interface-4.7.1
PS D:\Python\Python-100-Days\001>

解决。

你可能感兴趣的:(Python小白)