пытаюсь скачать модуль turtle через pip. Пишу: pip install turtle. Выдает такую вот психоделическую дичь:
Collecting turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
ERROR: Command errored out with exit status 1:
command: ‘d:\users\моргенштерн\appdata\local\programs\python\python39\python.exe’ -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘D:\\Users\\Моргенштерн\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_b4a34253d5e146bb8a66d52189e73f1e\\setup.py'»‘»‘; __file__='»‘»‘D:\\Users\\Моргенштерн\\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'»‘»‘, ‘»‘»‘\n'»‘»‘);f.close();exec(compile(code, __file__, ‘»‘»‘exec'»‘»‘))’ egg_info —egg-base ‘D:\Users\Моргенштерн\AppData\Local\Temp\pip-pip-egg-info-bexothid’
cwd: D:\Users\Моргенштерн\AppData\Local\Temp\pip-install-xxm4e8b9\turtle_b4a34253d5e146bb8a66d52189e73f1e\
Complete output (6 lines):
Traceback (most recent call last):
File «», line 1, in
File «D:\Users\Моргенштерн\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\моргенштерн\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\моргенштерн\appdata\local\programs\python\python39\python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘D:\\Users\\Моргенштерн\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_8d6401ce1f594f48b2e5149b178cfef8\\setup.py'»‘»‘; __file__='»‘»‘D:\\Users\\Моргенштерн\\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'»‘»‘, ‘»‘»‘\n'»‘»‘);f.close();exec(compile(code, __file__, ‘»‘»‘exec'»‘»‘))’ install —record ‘D:\Users\Моргенштерн\AppData\Local\Temp\pip-record-yvhaijtc\install-record.txt’ —single-version-externally-managed —compile —install-headers ‘d:\users\моргенштерн\appdata\local\programs\python\python39\Include\turtle’
cwd: D:\Users\Моргенштерн\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\моргенштерн\appdata\local\programs\python\python39\Lib\site-packages\turtle\service.py to service.cpython-39.pyc
File «d:\users\моргенштерн\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\моргенштерн\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\\моргенштерн\\appdata\\local\\programs\\python\\python39\\python.exe’ failed with exit code 1
—————————————-
ERROR: Command errored out with exit status 1: ‘d:\users\моргенштерн\appdata\local\programs\python\python39\python.exe’ -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘»‘»‘D:\\Users\\Моргенштерн\\AppData\\Local\\Temp\\pip-install-xxm4e8b9\\turtle_8d6401ce1f594f48b2e5149b178cfef8\\setup.py'»‘»‘; __file__='»‘»‘D:\\Users\\Моргенштерн\\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'»‘»‘, ‘»‘»‘\n'»‘»‘);f.close();exec(compile(code, __file__, ‘»‘»‘exec'»‘»‘))’ install —record ‘D:\Users\Моргенштерн\AppData\Local\Temp\pip-record-yvhaijtc\install-record.txt’ —single-version-externally-managed —compile —install-headers ‘d:\users\моргенштерн\appdata\local\programs\python\python39\Include\turtle’ Check the logs for full command output.
I get the following error when installing turtle
, what should I do?
$ sudo pip install turtle --proxy http://10.144.1.10:8080
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting turtle
Using cached https://files.pythonhosted.org/packages/ff/f0/21a42e9e424d24bdd0e509d5ed3c7dfb8f47d962d9c044dba903b0b4a26f/turtle-0.0.2.tar.gz
ERROR: Complete output from command python setup.py egg_info:
ERROR: Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-smo98rwf/turtle/setup.py", line 40
except ValueError, ve:
^
SyntaxError: invalid syntax
----------------------------------------
ERROR: Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-smo98rwf/turtle/
I am using Fedora 31, and pip version:
$ pip --version
pip 19.1.1 from /usr/lib/python3.7/site-packages/pip (python 3.7)
Some other python library can be installed successfully, like:
$ sudo pip install scipy --proxy http://10.144.1.10:8080
WARNING: Running pip install with root privileges is generally not a good idea. Try `pip install --user` instead.
Collecting scipy
Downloading https://files.pythonhosted.org/packages/37/9d/a606dc7b17ef0b7326afd128e132b7a483d5611da603334842df75d92d3c/scipy-1.4.0-cp37-cp37m-manylinux1_x86_64.whl (26.1MB)
|████████████████████████████████| 26.1MB 824kB/s
Requirement already satisfied: numpy>=1.13.3 in /usr/local/lib64/python3.7/site-packages (from scipy) (1.17.4)
Installing collected packages: scipy
Successfully installed scipy-1.4.0
BTW, turtle seems not installed within my python…
$ python
Python 3.7.5 (default, Dec 15 2019, 17:54:26)
[GCC 9.2.1 20190827 (Red Hat 9.2.1-1)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import turtle
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'turtle'
>>>
Summary:
turtle graphics
is a part of python3 standard library, no need to install it. If import turtle
shows error like «No module named…», it could be solved by, for example in Fedora, sudo dnf install python3-tkinter
Description
Hi
so i dont think this is a pip issue but i am having an issue with embedded python and the pip python zip app so yea…
`E:\otherdownload\python-3.11.0-embed-amd64>python pip.pyz install Turtle
Collecting Turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File «», line 2, in
File «», line 34, in
File «C:\Users\Paxton\AppData\Local\Temp\pip-install-62qiykxn\turtle_1bb751685c334e43b1e8b134cfa1465e\setup.py», line 40
except ValueError, ve:
^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`
and
E:\otherdownload\python-3.11.0-embed-amd64>python proj/test.py Traceback (most recent call last): File "E:\otherdownload\python-3.11.0-embed-amd64\proj\test.py", line 1, in <module> import Turtle ModuleNotFoundError: No module named 'Turtle'
can someone help me
Expected behavior
installing turtle
pip version
22.3.1
Python version
3.11 embedded
OS
Windows 10
How to Reproduce
- extract python embedded and pip.pyz
- run «python pip.pyz install turtle»
- error
Output
`Collecting Turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File «», line 2, in
File «», line 34, in
File «C:\Users\Paxton\AppData\Local\Temp\pip-install-62qiykxn\turtle_1bb751685c334e43b1e8b134cfa1465e\setup.py», line 40
except ValueError, ve:
^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.`
Traceback (most recent call last): File "E:\otherdownload\python-3.11.0-embed-amd64\proj\test.py", line 1, in <module> import Turtle ModuleNotFoundError: No module named 'Turtle'
Code of Conduct
- I agree to follow the PSF Code of Conduct.
pip install turtle
Collecting turtle
Using cached turtle-0.0.2.tar.gz (11 kB)
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error
× python setup.py egg<em>info did not run successfully.
│ exit code: 1
╰─> [7 lines of output]
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "C:\Users\user\AppData\Local\Temp\pip-install-2pzr</em>rrh\turtle_eb2e3b23e85541d184dec515fb2d4ac2\setup.py", line 40
except ValueError, ve:
^^^^^^^^^^^^^^
SyntaxError: multiple exception types must be parenthesized
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed
× Encountered error while generating package metadata.
╰─> See above for output.
note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
Need Solution to solve this
Posts: 12
Threads: 1
Joined: Nov 2018
Reputation:
0
Nov-10-2018, 07:55 PM
(This post was last modified: Nov-10-2018, 07:55 PM by MasterJediKnight7.)
Hi. I have a problem when I try to install the module Turtle.
I can’t find anything about that error anywhere.
When I do «pip install turtle», it doesn’t work either.
Can someone give me some advice, please?
Here is an example:
Python version 3.7.1
pip version:18.1
Posts: 4,239
Threads: 67
Joined: Jan 2018
Reputation:
329
Nov-10-2018, 08:01 PM
(This post was last modified: Nov-10-2018, 08:01 PM by Gribouillis.)
Are you sure you want to install this turtle module? It is different from the turtle module from the standard library (which you don’t need to install).
The line except ValueError, ve:
raises a SyntaxError because it is a python 2 syntax. This turtle module may not be available for python 3.7. The latest version dates from 2009.
Posts: 12
Threads: 1
Joined: Nov 2018
Reputation:
0
Nov-10-2018, 08:07 PM
(This post was last modified: Nov-10-2018, 08:08 PM by MasterJediKnight7.)
(Nov-10-2018, 08:01 PM)Gribouillis Wrote: Are you sure you want to install this turtle module? It is different from the turtle module from the standard library (which you don’t need to install).
The line
except ValueError, ve:
raises a SyntaxError because it is a python 2 syntax. This turtle module may not be available for python 3.7. The latest version dates from 2009.
I’m trying to install this turtle. I think the standard library is damage because it doesn’t recognize «forward()».
The turtle worked with the 3.6.6 version of Python.
That’s why I’m trying to reinstall it.
Posts: 4,239
Threads: 67
Joined: Jan 2018
Reputation:
329
Nov-10-2018, 08:30 PM
(This post was last modified: Nov-10-2018, 08:30 PM by Gribouillis.)
Don’t try to reinstall standard library modules. They’re not broken. The most likely problem is that you have another file named turtle.py
in your current directory or somewhere on the python path. Try this
import turtle print(turtle)
and see if the file is the standard library’s module turtle. If you have another file named turtle.py on the python path, rename it to something else.
Posts: 12
Threads: 1
Joined: Nov 2018
Reputation:
0
Nov-10-2018, 08:51 PM
(This post was last modified: Nov-10-2018, 08:51 PM by MasterJediKnight7.)
This is what it gives me:
<module ‘turtle’ from ‘C:\\Users\\jedi\\AppData\\Local\\Programs\\Python\\Python37\\lib\\turtle.py’>
And here what I find the files with turtle in their name.
Posts: 4,239
Threads: 67
Joined: Jan 2018
Reputation:
329
Can you list all the files named turtle.py or turtle.pyc on the computer ? Keep only the one that’s in python’s standard library. You could try for example
import types print(types)
to find the directory
Posts: 12
Threads: 1
Joined: Nov 2018
Reputation:
0
Nov-10-2018, 09:34 PM
(This post was last modified: Nov-10-2018, 09:54 PM by MasterJediKnight7.)
(Nov-10-2018, 09:00 PM)Gribouillis Wrote: Can you list all the files named turtle.py or turtle.pyc on the computer ? Keep only the one that’s in python’s standard library. You could try for example
import types print(types)to find the directory
I know that in the file Python, I have a file launcher and a file Python36-32.
Would it be because of the files of that last folder?
I have deleted the Python 36-32 file.
But nothing changes.
Posts: 4,239
Threads: 67
Joined: Jan 2018
Reputation:
329
(Nov-10-2018, 08:07 PM)MasterJediKnight7 Wrote: I think the standard library is damage because it doesn’t recognize «forward()».
Can you post example code where this fails, with the complete output and error message?
Posts: 12
Threads: 1
Joined: Nov 2018
Reputation:
0
(Nov-10-2018, 09:57 PM)Gribouillis Wrote:
(Nov-10-2018, 08:07 PM)MasterJediKnight7 Wrote: I think the standard library is damage because it doesn’t recognize «forward()».
Can you post example code where this fails, with the complete output and error message?
from turtle import* myTurtle = turtle.Turtle() myTurtle.circle(50) turtle.getscreen()._root.mainloop()
Traceback (most recent call last):
File «A:\0_ingschool\Courses\Fundamentals of Algorithm\Python\Group Projects\turtle1.py», line 1, in <module>
from turtle import*
File «A:\0_ingschool\Courses\Fundamentals of Algorithm\Python\Group Projects\turtle.py», line 2, in <module>
forward(120)
NameError: name ‘forward’ is not defined
Posts: 4,239
Threads: 67
Joined: Jan 2018
Reputation:
329
(Nov-10-2018, 10:15 PM)MasterJediKnight7 Wrote: A:\0_ingschool\Courses\Fundamentals of Algorithm\Python\Group Projects\turtle.py
This is most certainly the faulty file. Try to give another name to this file.