아나콘다 프롬프트나 명령 프롬프트를 사용하여 Python에 거북이를 설치할 수 없습니까?

아나콘다 프롬프트나 명령 프롬프트를 사용하여 Python에 거북이를 설치할 수 없습니까?

python -m pip install turtle

이 명령을 사용하여 거북이를 설치했지만 오류가 발생했습니다.

C:\Windows\system32>pip install turtle
Collecting turtle
  Using cached https://files.pythonhosted.org/packages/ff/f0/21a42e9e424d24bdd0e509d5ed3c7dfb8f47d962d9c044dba903b0b4a26f/turtle-0.0.2.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\vaibh\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\vaibh\\AppData\\Local\\Temp\\pip-install-7hujbb79\\turtle\\setup.py'"'"'; __file__='"'"'C:\\Users\\vaibh\\AppData\\Local\\Temp\\pip-install-7hujbb79\\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 pip-egg-info
         cwd: C:\Users\vaibh\AppData\Local\Temp\pip-install-7hujbb79\turtle\
    Complete output (6 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\vaibh\AppData\Local\Temp\pip-install-7hujbb79\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.

어떻게 해결할 수 있나요?

답변1

이것은 거북이의 Python2와 호환되지 않는 구문입니다. 다운로드할 수 있습니다.거북이로컬 PC로,

그런 다음 압축을 풀고 setup.py40행을 다음과 같이 수정합니다.except (ValueError, ve):

그런 다음 설치해 보십시오 pip install -e turtle-0.0.2.

관련 정보