You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I attempted to run ptpython from within jupyter-console (jc from now on; for the signature help, docs, vim keybindings & overall better ergonomics). First after installing into the jupyterlab venv (via pipx inject), running jc didnt import the package (my guess is it's running a separate python interp that isnt connected to the top level "jupyterlab" venv), anyway, "%pip install ptpython" allowed for the package to be installed into the local jc repl. The error I'm bringing up is that when I followed the instructions:
from ptpython.repl import embed
jc returned the following error:
In [5]: import ptpython.repl.embed
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
Cell In[5], line 1
----> 1 import ptpython.repl.embed
File ~/.pyenv/versions/gen/lib/python3.12/site-packages/ptpython/__init__.py:3
1 from __future__ import annotations
----> 3 from .repl import embed
5 __all__ = ["embed"]
File ~/.pyenv/versions/gen/lib/python3.12/site-packages/ptpython/repl.py:23
20 from dis import COMPILER_FLAG_NAMES
21 from typing import Any, Callable, ContextManager, Iterable
---> 23 from prompt_toolkit.formatted_text import OneStyleAndTextTuple
24 from prompt_toolkit.patch_stdout import patch_stdout as patch_stdout_context
25 from prompt_toolkit.shortcuts import (
26 clear_title,
27 set_title,
28 )
ImportError: cannot import name 'OneStyleAndTextTuple' from 'prompt_toolkit.formatted_text' (/home/rocket/.pyenv/versions/gen/lib/python3.12/site-packages/prompt_toolkit/formatted_text/__init__.py)
I noticed in some other threads you say something along the lines that "even python 3.12 and 3.13 should work fine," or words to that effect.
Same error here. Instead i am running the ptpython repl
On Windows 11 .
ptpython version: ptpython-3.0.26.
errors out on both python 3.11 and 3.12 for me
I attempted to run ptpython from within jupyter-console (jc from now on; for the signature help, docs, vim keybindings & overall better ergonomics). First after installing into the jupyterlab venv (via pipx inject), running jc didnt import the package (my guess is it's running a separate python interp that isnt connected to the top level "jupyterlab" venv), anyway, "%pip install ptpython" allowed for the package to be installed into the local jc repl. The error I'm bringing up is that when I followed the instructions:
jc returned the following error:
I noticed in some other threads you say something along the lines that "even python 3.12 and 3.13 should work fine," or words to that effect.
Running Ubuntu 22.04.4 LTS Jammy (WSL2g)
python 3.12.2
ptpython 3.0.26
prompt-toolkit 3.0.36
The text was updated successfully, but these errors were encountered: