Basically yes. You can think of it as a more performant multiprocessing. Although the Python interface you mention will only be available in 3.13, for now it's strictly for the C API Answer from Yoghurt42 on reddit.com
🌐
Python
docs.python.org › 3 › library › concurrent.interpreters.html
concurrent.interpreters — Multiple interpreters in the same process
The module is primarily meant to provide a basic API for managing interpreters (AKA “subinterpreters”) and running things in them.
🌐
Reddit
reddit.com › r/python › what are the differences between python 3.12 sub-interpreters and multithreading/multiprocessing?
r/Python on Reddit: What are the differences between Python 3.12 sub-interpreters and multithreading/multiprocessing?
October 3, 2023 -

It seems like the new feature in Python 3.12 allows developers to create multiple sub-interpreters within a single main interpreter process. From the example from the PEP 554, sub-interpreters appear to be separate threads that run a dedicated piece of Python code and consequently have their own separate GILs.

interp = interpreters.create()
print('before')
interp.run('print("during")')
print('after')

On practice, is this basically the new Pythonic way to run a single application in multiple threads and take advantage of multiple cores? If yes, can they be thought as multithreading with no shared state and become the future alternative of multiprocessing?

Discussions

Subinterpreters with multiple threads
From this, we create multiple subinterpreters; for each piece of work to process, we find the correct subinterpreter, restore its thread (via PyEval_RestoreThread), have it do some work, then save the thread again (PyEval_SaveThread). We’re finding that this doesn’t work any more in 3.12 ... More on discuss.python.org
🌐 discuss.python.org
0
0
April 30, 2024
Clarification on PEP 734 subinterpreters with embedded C API - Core Development - Discussions on Python.org
I’m currently elbow deep in landing the patches for iOS support, and think I’ve hit an edge case in either the definition or implementation of PEP 734 (the new subinterpreters PEP). PEP 734 says: When a Python process starts, it creates a single interpreter state (the “main” interpreter) ... More on discuss.python.org
🌐 discuss.python.org
2
February 14, 2024
Building with subinterpreters? - Core Development - Discussions on Python.org
On main, when I run the test suite, I get this output at the end: 1 test run no tests: test_interpreters Looking in Lib/test_interpreters, it seems that it thinks subinterpreter support is missing, yet I can import the _interpreters module: % ./python.exe Python 3.14.0a0 experimental free-threading ... More on discuss.python.org
🌐 discuss.python.org
0
May 22, 2024
ENH: Please support subinterpreters
Proposed new feature or change: Version 1.25.1, Python 3.12.re02 After enabling interpreters in Python C Api: PyInterpreterConfig config = { .check_multi_interp_extensions = 1, .gil = PyInterpreter... More on github.com
🌐 github.com
15
September 20, 2023
🌐
Python
docs.python.org › 3 › c-api › subinterpreters.html
Multiple interpreters in a Python process — Python 3.14.3 documentation
3 weeks ago - While in most uses, you will only embed a single Python interpreter, there are cases where you need to create several independent interpreters in the same process and perhaps even in the same threa...
🌐
Real Python
realpython.com › python312-subinterpreters
Python 3.12 Preview: Subinterpreters – Real Python
May 3, 2024 - In the case of most Python users, CPython is the interpreter you’re running. A subinterpreter is a copy of the full CPython interpreter that can run independently from the main interpreter that started alongside your program.
🌐
Anthony Shaw
tonybaloney.github.io › posts › sub-interpreter-web-workers.html
Running Python Parallel Applications with Sub Interpreters
November 17, 2023 - Python 3.12 introduced a new API for “sub interpreters”, which are a different parallel execution model for Python that provide a nice compromise between the true parallelism of multiprocessing, but with a much faster startup time.
🌐
Changs
blog.changs.co.uk › subinterpreters-and-asyncio.html
Subinterpreters and Asyncio
August 5, 2025 - PEP-734 subinterpreters in the stdlib has officially been included in the Python 3.14 as a very late addition. subinterpreters now has a new home...
🌐
Readthedocs
anyio.readthedocs.io › en › latest › subinterpreters.html
Working with subinterpreters — AnyIO 4.13.0.post2 documentation
Subinterpreters offer a middle ground between worker threads and worker processes. They allow you to utilize multiple CPU cores to run Python code while avoiding the overhead and complexities of spawning subprocesses.
Find elsewhere
🌐
Talk Python To Me
talkpython.fm › episodes › show › 447 › parallel-python-apps-with-sub-interpreters
Episode #447 - Parallel Python Apps with Sub Interpreters | Talk Python To Me Podcast
February 3, 2024 - We have the Faster CPython initiative going strong, the recent async work, the adoption of typing and on this episode we discuss a new isolation and parallelization capability coming to Python through sub-interpreters. We have Eric Snow who spearheaded the work to get them added to Python 3.12 and is working on the Python API for 3.13 along with Anthony Shaw who has been pushing the boundaries of what you can already do with subinterpreters.
🌐
Python
peps.python.org › pep-0554
PEP 554 – Multiple Interpreters in the Stdlib | peps.python.org
CPython has supported multiple interpreters in the same process (AKA “subinterpreters”) since version 1.5 (1997). The feature has been available via the C-API. [c-api] Multiple interpreters operate in relative isolation from one another, ...
🌐
Changs
blog.changs.co.uk › how-good-are-sub-interpreters-in-python-now.html
How good are sub-interpreters in Python now?
January 3, 2025 - ➜ subinterpreters git:(main) ✗ uv run d6.py Reading inline script metadata from `d6.py` part1 4883 part2 1655; workers = 1 3.575728 s elapsed part2 1655; workers = 2 1.858705 s elapsed part2 1655; workers = 3 1.284574 s elapsed part2 1655; workers = 4 0.977416 s elapsed part2 1655; workers = 5 0.8245 s elapsed part2 1655; workers = 6 0.739645 s elapsed part2 1655; workers = 7 0.692572 s elapsed part2 1655; workers = 8 0.68285 s elapsed part2 1655; workers = 9 0.623754 s elapsed part2 1655; workers = 10 0.625284 s elapsed part2 1655; workers = 11 0.600622 s elapsed part2 1655; workers = 12 0.627131 s elapsed part2 1655; workers = 13 0.578773 s elapsed part2 1655; workers = 14 0.586851 s elapsed part2 1655; workers = 15 0.600652 s elapsed
🌐
Media.CCC
media.ccc.de › v › sps24-56253-parallel-python-at-last-subi
Parallel Python at last? Subinterpreters & free-threading in practice - media.ccc.de
Python, otherwise the star of data science and ML, doesn't really shine when it comes to parallel workloads. But that is finally changing! There is more focus and progress happening in this area than ever before, and promising leaps forward are on the horizon. Subinterpreters, already merged in 3.12, offer a tentative step towards making the GIL less than "global" …
Published   October 30, 2024
🌐
Europython
ep2024.europython.eu › session › python-in-parallel-sub-interpreters-vs-nogil-vs-multiprocessing
Python in Parallel: Sub-Interpreters vs. NoGIL vs. Multiprocessing
A new per-Interpreter GIL in Python 3.12 helps to facilitate true parallelism by opening up sub interpreters to run Python codes at the same time.
🌐
PyCon US
us.pycon.org › 2024 › schedule › presentation › 128 › index.html
Subinterpreters and Free-Threading in Python 3.13
Python 3.12 introduced a new parallel execution model called "sub interpreters" that uses a per-interpreter GIL to unlock a new way of writing parallel code that's faster than multiprocessing. Python 3.13 introduces another new parallel execution model called "free-threading" (previously called ...
🌐
mliezun.com
mliezun.github.io › 2024 › 08 › 19 › cpython-subinterpreters.html
Finding and fixing a bug in Python subinterpreters
August 19, 2024 - Lately, I've been working with Python C-API. I wanted to use subinterpreters with their own GIL to unlock the performance gains promised by being able to execute many threads in parallel which was not possible before Python 3.12.
🌐
Python.org
discuss.python.org › python help
Subinterpreters with multiple threads - Python Help - Discussions on Python.org
April 30, 2024 - We have a setup with a Python interpreter embedded into a server binary using the C API. From this, we create multiple subinterpreters; for each piece of work to process, we find the correct subinterpreter, restore its thread (via PyEval_RestoreThread), have it do some work, then save the thread again (PyEval_SaveThread).
🌐
Python.org
discuss.python.org › core development
Clarification on PEP 734 subinterpreters with embedded C API - Core Development - Discussions on Python.org
February 14, 2024 - I’m currently elbow deep in landing the patches for iOS support, and think I’ve hit an edge case in either the definition or implementation of PEP 734 (the new subinterpreters PEP). PEP 734 says: When a Python process starts, it creates a single interpreter state (the “main” interpreter) with a single thread state for the current OS thread.
🌐
Python.org
discuss.python.org › core development
Building with subinterpreters? - Core Development - Discussions on Python.org
May 22, 2024 - On main, when I run the test suite, I get this output at the end: 1 test run no tests: test_interpreters Looking in Lib/test_interpreters, it seems that it thinks subinterpreter support is missing, yet I can import the _interpreters module: % ./python.exe Python 3.14.0a0 experimental free-threading ...
🌐
GitHub
github.com › numpy › numpy › issues › 24755
ENH: Please support subinterpreters · Issue #24755 · numpy/numpy
September 20, 2023 - Proposed new feature or change: Version 1.25.1, Python 3.12.re02 After enabling interpreters in Python C Api: PyInterpreterConfig config = { .check_multi_interp_extensions = 1, .gil = PyInterpreter...
Author   mkostousov
🌐
Stack Overflow
stackoverflow.com › questions › tagged › python-subinterpreters
Newest 'python-subinterpreters' Questions - Stack Overflow
python-subinterpreters refer to executing more than one Python interpreter in the same process.