I'm trying to install the turtle package for Python 3 on Ubuntu using pip. However, pip is raising subprocess-exited-with-error when I run pip3 install turtle.
I've already installed python-tk on my system; how can I install the turtle package correctly?
You don't need to install turtle at all.
The turtle graphics library built on top of python-tk is part of the Python 3 standard library. It doesn't require installation; it's already included with Python 3.
The thing pip is trying to install is a much older library with the same name but built for a completely different purpose, which was never updated to be compatible with Python 3 in the first place.
Just import turtle. You don't need to install anything first.
(That said, note that you need python3-tk, not python-tk, to use turtle with Python 3).
To demonstrate the above, see https://packages.ubuntu.com/jammy/amd64/libpython3.10-stdlib/filelist, listing the files included in libpython3.10-stdlib for the Jammy release of Ubuntu; you'll see /usr/lib/python3.10/turtle.py included.