V
V
Vadim)))2021-08-04 10:48:31
Python
Vadim))), 2021-08-04 10:48:31

Why is the turtle module not being installed?

I'm trying to download the turtle module via pip. I write: pip install turtle. It gives out such a psychedelic game:
Collecting turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: 'd:\users\morningstar\appdata\local\programs\python\python39\python.exe' -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\Users\\Morghenstern\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_b4a34253d5e146bb8a66d52189e73f1e\\setup.py'"'"'; __file__='"'"'D:\\Users\\Morgenstern\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_b4a34253d5e146bb8a66d52189e73f1e\\setup.py'"'"';f = getattr(tokenize , '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"' );code = f.read().replace('"'"'\r\n'"'"', '"'"
cwd: D:\Users\Morgenstern\AppData\Local\Temp\pip-install-xxm4e8b9\turtle_b4a34253d5e146bb8a66d52189e73f1e\
Complete output (6 lines):
Traceback (most recent call last):
File "", line 1, in
File "D: \Users\Morgenstern\AppData\Local\Temp\pip-install-xxm4e8b9\turtle_b4a34253d5e146bb8a66d52189e73f1e\setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----- --------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/ff/f0/21a4... ( from https://pypi.org/simple/turtle/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Using cached turtle-0.0.1.tar.gz (10 kB)
Requirement already satisfied: PyYAML>=3.08 in d:\users\morgenstern\appdata\local\programs\python\python39\lib\site-packages (from turtle) (5.4.1)
Using legacy 'setup.py install' for turtle, since package 'wheel' is not installed.
Installing collected packages: turtle
Running setup.py install for turtle ... error
ERROR: Command errored out with exit status 1:
command: 'd:\users\morningstar\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\Users\\Morgenstern\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_8d6401ce1f594f48b2e5149b178cfef8\\setup.py'"'"'; __file__='"'"'D:\\Users\\Morgenstern\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_8d6401ce1f594f48b2e5149b178cfef8\\setup.py'"'"';f = getattr(tokenize , '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"' );code = f.read().replace('"'"'\r\n'"'"', '"'"
cwd: D:\Users\Morgenstern\AppData\Local\Temp\pip-install-xxm4e8b9\turtle_8d6401ce1f594f48b2e5149b178cfef8\
Complete output (26 lines):
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\turtle
copying turtle \config.py -> build\lib\turtle
copying turtle\engine.py -> build\lib\turtle
copying turtle\proxy.py -> build\lib\turtle
copying turtle\service.py -> build\lib\turtle
copying turtle\__init__.py -> build\lib\turtle
creating build\lib\turtle\test
copying turtle\test\test_engine.py -> build\lib\turtle\test
copying turtle\test\test_proxy.py -> build\lib\turtle\test
copying turtle\test\__init__.py -> build\lib\turtle\test
running install_lib
byte-compiling d:\users\morgenstern\appdata\local\ programs\python\python39\Lib\site-packages\turtle\service.py to service.cpython-39.pyc
File "d:\users\morgenstern\appdata\local\programs\python\python39\Lib\site-packages\ turtle\service.py", line 85
print traceback.format_exc()
^
SyntaxError: invalid syntax

writing byte-compilation script 'D:\Users\F737~1\AppData\Local\Temp\tmp6o8ehxk6.py'
d:\users\ morningstar\appdata\local\programs\python\python39\python.exe D:\Users\F737~1\AppData\Local\Temp\tmp6o8ehxk6.py
SyntaxError: Non-UTF-8 code starting with '\xec' in file D:\Users\F737~1\AppData\Local\Temp\tmp6o8ehxk6.py on line 3, but no encoding declared; see python.org/dev/peps/pep-0263 for details
error: command 'd:\\users\\morningstar\\appdata\\local\\programs\\python\\python39\\python.exe' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: 'd:\users\morningstar\appdata\local\programs\python\python39\python.exe' -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'D:\\Users\\Morgenstern\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_8d6401ce1f594f48b2e5149b178cfef8\\setup.py'"'"'; __file__='"'"'D:\\Users\\Morgenstern\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_8d6401ce1f594f48b2e5149b178cfef8\\setup.py'"'"';f = getattr(tokenize , '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"' );code = f.read().replace('"'"'\r\n'"'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2021-08-04
@VadimCoder

You install the library for Python 2.7 in Python 3.9

S
Stefan, 2021-08-04
@MEDIOFF

Maybe because it doesn't need to be installed? It comes in the python standard library.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question