jupyter console does not properly clear the terminal when using %cls. ipython does work as expected. Here is what I'm using:
Jupyter console 6.6.3
Python 3.12.12 | packaged by conda-forge | (main, Jan 26 2026, 23:38:32) [MSC v.1944 64 bit (AMD64)]
Type 'copyright', 'credits' or 'license' for more information
IPython 9.10.0 -- An enhanced Interactive Python. Type '?' for help.
Tip: Use `F2` or %edit with no arguments to open an empty editor with a temporary file.
In [1]: %cls0.00s - Debugger warning: It seems that frozen modules are being used, which may
0.00s - make the debugger miss breakpoints. Please pass -Xfrozen_modules=off
0.00s - to python to disable frozen modules.
0.00s - Note: Debugging will proceed. Set PYDEVD_DISABLE_FILE_VALIDATION=1 to disable this validation.
In [1]: %cls
In [2]: %cls
In [3]:
And for completeness the complete env:
Details
Name Version Build Channel
-------------------------------------------------------------------------------------------
_openmp_mutex 4.5 20_gnu conda-forge
_python_abi3_support 1.0 hd8ed1ab_2 conda-forge
aiohappyeyeballs 2.6.1 pyhd8ed1ab_0 conda-forge
aiohttp 3.13.3 py312h6b91d65_0 conda-forge
aiosignal 1.4.0 pyhd8ed1ab_0 conda-forge
aom 3.9.1 he0c23c2_0 conda-forge
asttokens 3.0.1 pyhd8ed1ab_0 conda-forge
attrs 25.4.0 pyhcf101f3_1 conda-forge
blosc 1.21.6 hfd34d9b_1 conda-forge
brotli 1.2.0 h2d644bc_1 conda-forge
brotli-bin 1.2.0 hfd05255_1 conda-forge
bzip2 1.0.8 h0ad9c76_8 conda-forge
ca-certificates 2026.1.4 h4c7d964_0 conda-forge
cairo 1.18.4 h477c42c_1 conda-forge
clang 21.1.8 default_nocfg_hbb9487a_3 conda-forge
clang-21 21.1.8 default_hac490eb_3 conda-forge
clang-format 21.1.8 default_hac490eb_3 conda-forge
clang-tools 21.1.8 default_hac490eb_3 conda-forge
clangdev 21.1.8 default_hac490eb_3 conda-forge
clangxx 21.1.8 default_nocfg_hbb9487a_3 conda-forge
cli11 2.6.0 h5112557_0 conda-forge
click 8.3.1 pyha7b4d00_1 conda-forge
cmake_format 0.6.11 pyhd8ed1ab_1 conda-forge
colorama 0.4.6 pyhd8ed1ab_1 conda-forge
comm 0.2.3 pyhe01879c_0 conda-forge
compiler-rt21 21.1.8 h49e36cd_1 conda-forge
compiler-rt21_win-64 21.1.8 h49e36cd_1 conda-forge
contextlib2 21.6.0 pyhd8ed1ab_1 conda-forge
contourpy 1.3.3 py312h78d62e6_4 conda-forge
cpython 3.12.12 py312hd8ed1ab_2 conda-forge
cycler 0.12.1 pyhcf101f3_2 conda-forge
dav1d 1.2.1 hcfcfb64_0 conda-forge
debugpy 1.8.20 py312ha1a9051_0 conda-forge
decorator 5.2.1 pyhd8ed1ab_0 conda-forge
double-conversion 3.4.0 hac47afa_0 conda-forge
eigen 3.4.0 h477610d_1 conda-forge
executing 2.2.1 pyhd8ed1ab_0 conda-forge
expat 2.7.3 hac47afa_0 conda-forge
ffmpeg 8.0.1 gpl_hb2d76f6_912 conda-forge
fmt 12.1.0 h7f4e812_0 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 h77eed37_3 conda-forge
fontconfig 2.15.0 h765892d_1 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 hc364b38_1 conda-forge
fonttools 4.61.1 py312h05f76fc_0 conda-forge
freeglut 3.2.2 he0c23c2_3 conda-forge
freeimage 3.18.0 hf4481c9_24 conda-forge
freetype 2.14.1 h57928b3_0 conda-forge
fribidi 1.0.16 hfd05255_0 conda-forge
frozenlist 1.7.0 py312hfdf67e6_0 conda-forge
gdk-pixbuf 2.44.5 h1f5b9c4_0 conda-forge
gl2ps 1.4.2 had7236b_1 conda-forge
glew 2.2.0 hcc5dbe9_0 conda-forge
glslang 16.2.0 h5b34520_0 conda-forge
graphite2 1.3.14 hac47afa_2 conda-forge
greenlet 3.3.1 py312ha1a9051_1 conda-forge
harfbuzz 12.3.2 h5a1b470_0 conda-forge
hdf4 4.2.15 h5557f11_7 conda-forge
hdf5 1.14.6 nompi_hae35d4c_106 conda-forge
icu 78.2 h637d24d_0 conda-forge
idna 3.11 pyhd8ed1ab_0 conda-forge
imath 3.2.2 h1608b31_0 conda-forge
ipykernel 7.2.0 pyh6dadd2b_1 conda-forge
ipython 9.10.0 pyhe2676ad_0 conda-forge
ipython_pygments_lexers 1.1.1 pyhd8ed1ab_0 conda-forge
jasper 4.2.8 h8ad263b_0 conda-forge
jedi 0.19.2 pyhd8ed1ab_1 conda-forge
jinja2 3.1.6 pyhcf101f3_1 conda-forge
joblib 1.5.3 pyhd8ed1ab_0 conda-forge
jsoncpp 1.9.6 hda1637e_1 conda-forge
jupyter_client 8.8.0 pyhcf101f3_0 conda-forge
jupyter_console 6.6.3 pyhd8ed1ab_1 conda-forge
jupyter_core 5.9.1 pyh6dadd2b_0 conda-forge
jxrlib 1.1 hcfcfb64_3 conda-forge
kiwisolver 1.4.9 py312h78d62e6_2 conda-forge
krb5 1.21.3 hdf4eb48_0 conda-forge
lame 3.100 hcfcfb64_1003 conda-forge
lcms2 2.18 hf2c6c5f_0 conda-forge
lerc 4.0.0 h6470a55_1 conda-forge
libaec 1.1.5 haf901d7_0 conda-forge
libblas 3.11.0 5_hf2e6a31_mkl conda-forge
libboost 1.88.0 h9dfe17d_7 conda-forge
libboost-devel 1.88.0 h1c1089f_7 conda-forge
libboost-headers 1.88.0 h57928b3_7 conda-forge
libbrotlicommon 1.2.0 hfd05255_1 conda-forge
libbrotlidec 1.2.0 hfd05255_1 conda-forge
libbrotlienc 1.2.0 hfd05255_1 conda-forge
libcblas 3.11.0 5_h2a3cdd5_mkl conda-forge
libclang 21.1.8 default_hac490eb_3 conda-forge
libclang-cpp 21.1.8 default_hac490eb_3 conda-forge
libclang13 21.1.8 default_ha2db4b5_3 conda-forge
libcurl 8.18.0 h43ecb02_0 conda-forge
libdeflate 1.25 h51727cc_0 conda-forge
libexpat 2.7.3 hac47afa_0 conda-forge
libffi 3.5.2 h3d046cb_0 conda-forge
libfreetype 2.14.1 h57928b3_0 conda-forge
libfreetype6 2.14.1 hdbac1cb_0 conda-forge
libgcc 15.2.0 h8ee18e1_17 conda-forge
libglib 2.86.3 h0c9aed9_1 conda-forge
libgomp 15.2.0 h8ee18e1_17 conda-forge
libhwloc 2.12.2 default_h4379cf1_1000 conda-forge
libhwy 1.3.0 ha71e874_1 conda-forge
libiconv 1.18 hc1393d2_2 conda-forge
libintl 0.22.5 h5728263_3 conda-forge
libjpeg-turbo 3.1.2 hfd05255_0 conda-forge
libjxl 0.11.2 hf3f85d1_0 conda-forge
liblapack 3.11.0 5_hf9ab0e9_mkl conda-forge
liblief 0.17.1 hac47afa_0 conda-forge
libllvm-c21 21.1.8 h830ff33_0 conda-forge
libllvm21 21.1.8 h830ff33_0 conda-forge
liblzma 5.8.2 hfd05255_0 conda-forge
liblzma-devel 5.8.2 hfd05255_0 conda-forge
libnetcdf 4.9.3 nompi_h3948bcf_104 conda-forge
libogg 1.3.5 h2466b09_1 conda-forge
libopus 1.6.1 h6a83c73_0 conda-forge
libpng 1.6.55 h7351971_0 conda-forge
libraw 0.21.5 h345c428_0 conda-forge
librsvg 2.60.0 hd5e4115_0 conda-forge
libsodium 1.0.20 hc70643c_0 conda-forge
libsqlite 3.51.2 hf5d6505_0 conda-forge
libssh2 1.11.1 h9aa295b_0 conda-forge
libtheora 1.1.1 hc70643c_1006 conda-forge
libtiff 4.7.1 h8f73337_1 conda-forge
libusb 1.0.29 h1839187_0 conda-forge
libvorbis 1.3.7 h5112557_2 conda-forge
libvulkan-loader 1.4.341.0 h477610d_0 conda-forge
libwebp-base 1.6.0 h4d5522a_0 conda-forge
libwinpthread 12.0.0.r4.gg4f2fc60ca h57928b3_10 conda-forge
libxcb 1.17.0 h0e4246c_0 conda-forge
libxml2 2.15.1 h779ef1b_1 conda-forge
libxml2-16 2.15.1 h3cfd58e_1 conda-forge
libzip 1.11.2 h3135430_0 conda-forge
libzlib 1.3.1 h2466b09_2 conda-forge
llvm-openmp 21.1.8 h4fa8253_0 conda-forge
llvm-tools 21.1.8 h752b59f_0 conda-forge
llvmdev 21.1.8 h830ff33_0 conda-forge
loguru 0.7.3 pyh7428d3b_0 conda-forge
logzero 1.7.0 py312h2e8e312_7 conda-forge
lz4-c 1.10.0 h2466b09_1 conda-forge
markupsafe 3.0.3 py312h05f76fc_0 conda-forge
matplotlib-base 3.10.8 py312h0ebf65c_0 conda-forge
matplotlib-inline 0.2.1 pyhd8ed1ab_0 conda-forge
mbedtls 3.6.3.1 he0c23c2_0 conda-forge
mesalib 25.0.5 hf8ad13a_2 conda-forge
mkl 2025.3.0 hac47afa_455 conda-forge
msgpack-python 1.1.2 py312hf90b1b7_1 conda-forge
multidict 6.7.0 py312h05f76fc_0 conda-forge
munkres 1.1.4 pyhd8ed1ab_1 conda-forge
nest-asyncio 1.6.0 pyhd8ed1ab_1 conda-forge
nlohmann_json 3.12.0 h5112557_1 conda-forge
numpy 2.4.2 py312ha72d056_1 conda-forge
occt 7.9.3 all_h4dbfbd5_200 conda-forge
openexr 3.4.4 h3840fac_1 conda-forge
openh264 2.6.0 hb17fa0b_0 conda-forge
openjpeg 2.5.4 h24db6dd_0 conda-forge
openjph 0.26.0 hf13a347_0 conda-forge
openssl 3.6.1 hf411b9b_1 conda-forge
packaging 26.0 pyhcf101f3_0 conda-forge
pandas 3.0.0 py312h95189c4_0 conda-forge
pandas-stubs 3.0.0.260204 pyhd8ed1ab_1 conda-forge
pango 1.56.4 h03d888a_0 conda-forge
parso 0.8.6 pyhcf101f3_0 conda-forge
path 17.1.1 pyhd8ed1ab_0 conda-forge
pcre2 10.47 hd2b5f0e_0 conda-forge
pillow 12.1.1 py312h31f0997_0 conda-forge
pip 26.0.1 pyh8b19718_0 conda-forge
pixman 0.46.4 h5112557_1 conda-forge
platformdirs 4.9.1 pyhcf101f3_0 conda-forge
proj 9.7.1 hd30e2cd_3 conda-forge
prompt-toolkit 3.0.52 pyha770c72_0 conda-forge
prompt_toolkit 3.0.52 hd8ed1ab_0 conda-forge
propcache 0.3.1 py312h31fea79_0 conda-forge
psutil 7.2.2 py312he5662c2_0 conda-forge
pthread-stubs 0.4 h0e40799_1002 conda-forge
pugixml 1.15 h372dad0_0 conda-forge
pure_eval 0.2.3 pyhd8ed1ab_1 conda-forge
py-lief 0.17.1 py312hbb81ca0_0 conda-forge
pybind11 2.13.6 pyhc790b64_3 conda-forge
pybind11-global 2.13.6 pyh6a1d191_3 conda-forge
pygments 2.19.2 pyhd8ed1ab_0 conda-forge
pynvim 0.6.0 pyhcf101f3_1 conda-forge
pyparsing 3.3.2 pyhcf101f3_0 conda-forge
python 3.12.12 h0159041_2_cpython conda-forge
python-clang 21.1.8 default_hccd1708_3 conda-forge
python-dateutil 2.9.0.post0 pyhe01879c_2 conda-forge
python-gil 3.12.12 hd8ed1ab_2 conda-forge
python-tzdata 2025.3 pyhd8ed1ab_0 conda-forge
python_abi 3.12 8_cp312 conda-forge
pywin32 311 py312h829343e_1 conda-forge
pywrap 0.1.dev0 pypi_0 pypi
pyzmq 27.1.0 py312hbb5da91_0 conda-forge
qhull 2020.2 hc790b64_5 conda-forge
qt6-main 6.10.2 h68b6638_4 conda-forge
rapidjson 1.1.0.post20240409 he0c23c2_2 conda-forge
schema 0.7.7 pyhd8ed1ab_0 conda-forge
sdl2 2.32.56 h5112557_0 conda-forge
sdl3 3.4.0 h5112557_0 conda-forge
setuptools 82.0.0 pyh332efcf_0 conda-forge
shaderc 2025.5 haa9a63f_0 conda-forge
six 1.17.0 pyhe01879c_1 conda-forge
snappy 1.2.2 h7fa0ca8_1 conda-forge
spirv-tools 2025.5 h49e36cd_0 conda-forge
sqlite 3.51.2 hdb435a2_0 conda-forge
stack_data 0.6.3 pyhd8ed1ab_1 conda-forge
svt-av1 4.0.1 hac47afa_0 conda-forge
tbb 2022.3.0 h3155e25_2 conda-forge
tbb-devel 2022.3.0 h68e04fd_2 conda-forge
tk 8.6.13 h6ed50ae_3 conda-forge
toml 0.10.2 pyhcf101f3_3 conda-forge
toposort 1.10 pyhd8ed1ab_1 conda-forge
tornado 6.5.4 py312he06e257_0 conda-forge
tqdm 4.67.3 pyha7b4d00_0 conda-forge
traitlets 5.14.3 pyhd8ed1ab_1 conda-forge
types-pytz 2025.2.0.20251108 pyhd8ed1ab_0 conda-forge
typing_extensions 4.15.0 pyhcf101f3_0 conda-forge
tzdata 2025c hc9c84f9_1 conda-forge
ucrt 10.0.26100.0 h57928b3_0 conda-forge
unicodedata2 17.0.1 py312he06e257_0 conda-forge
utfcpp 4.09 h57928b3_0 conda-forge
vc 14.3 h41ae7f8_34 conda-forge
vc14_runtime 14.44.35208 h818238b_34 conda-forge
vcomp14 14.44.35208 h818238b_34 conda-forge
viskores 1.1.0 h509acf7_0 conda-forge
vs2015_runtime 14.44.35208 h38c0c73_34 conda-forge
vtk 9.5.2 py312h5ad3caf_7 conda-forge
vtk-base 9.5.2 py312hf3bd38e_7 conda-forge
wcwidth 0.6.0 pyhd8ed1ab_0 conda-forge
wheel 0.46.3 pyhd8ed1ab_0 conda-forge
win32_setctime 1.2.0 pyhd8ed1ab_0 conda-forge
wslink 2.5.0 pyhd8ed1ab_0 conda-forge
x264 1!164.3095 h8ffe710_2 conda-forge
x265 3.5 h2d74725_3 conda-forge
xorg-libxau 1.0.12 hba3369d_1 conda-forge
xorg-libxdmcp 1.1.5 hba3369d_1 conda-forge
yarl 1.22.0 py312h05f76fc_0 conda-forge
zeromq 4.3.5 h5bddc39_9 conda-forge
zfp 1.0.1 h2f0f97f_5 conda-forge
zlib-ng 2.3.3 h0261ad2_1 conda-forge
zstd 1.5.7 h534d264_6 conda-forge
jupyter consoledoes not properly clear the terminal when using%cls.ipythondoes work as expected. Here is what I'm using:And for completeness the complete env:
Details