Install & Compatibility
Where this runs
tested against v0.11.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.1MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 1.6s · import 0.000s · 19MB
16MB installed
● package 16MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
InteractiveConsole
✓ from pyrepl import InteractiveConsole
✗ from pyrepl import InteractiveConsole
This quickstart demonstrates how to embed a pyrepl-powered interactive console into a Python application using `InteractiveConsole` from `pyrepl.cmdrepl`. It creates a console instance, initializes it with the current global and local scope, and then starts an interactive loop. Users can execute Python code directly within this embedded REPL.
import sys
from pyrepl.cmdrepl import InteractiveConsole
def main():
# Instantiate an interactive console
console = InteractiveConsole(locals=globals())
# Start the interactive loop
print("\nWelcome to pyrepl interactive console! Type 'exit()' or Ctrl-D to quit.")
console.interact()
print("Exiting pyrepl console.")
if __name__ == '__main__':
main()
Debug
Known issues
gotchaPyrepl's default keybindings for history navigation differ from standard terminal behavior. Instead of up/down arrow keys, use `Ctrl+P` (previous) and `Ctrl+N` (next) to cycle through command history. Arrow keys are used for moving within the current line.fixUsers accustomed to other REPLs should remember to use `Ctrl+P` and `Ctrl+N` for history, or explore custom keybindings if available in the specific pyrepl integration.
affects: All versions
gotchaThere is significant confusion between the `pyrepl` library (this package) and `PyREPL`, the new interactive interpreter *based on* `pyrepl` that is becoming the default for CPython 3.13. While related, they are distinct. CPython's `PyREPL` has its own development and rollout nuances (e.g., specific platform support like Windows), which may not directly apply to the standalone `pyrepl` library.fixWhen researching, ensure you distinguish between 'pyrepl' (the library) and 'PyREPL' (CPython's new default REPL) to find relevant documentation and solutions.
affects: All versions, especially relevant with Python 3.13+
Upgrade
Version history
0.11.5latest on PyPI · released Aug 2, 2026
Audit
Dependencies
No dependency data recorded yet.