Jupyter-console not working

Trying to use jupyter-console I get the following output and exit

0.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.
0.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.
Jupyter console 6.6.3

Python 3.11.6 (main, Nov 14 2023, 09:36:21) [GCC 13.2.1 20230801]
Type 'copyright', 'credits' or 'license' for more information
IPython 8.19.0 -- An enhanced Interactive Python. Type '?' for help.
Traceback (most recent call last):
  File "/usr/bin/jupyter-console", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/jupyter_core/application.py", line 307, in launch_instance
    loop.run_until_complete(coro)
  File "/usr/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
    return future.result()
           ^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/jupyter_core/application.py", line 294, in _async_launch_instance
    app.start()
  File "/usr/lib/python3.11/site-packages/jupyter_console/app.py", line 148, in start
    self.shell.mainloop()
  File "/usr/lib/python3.11/site-packages/jupyter_console/ptshell.py", line 676, in mainloop
    asyncio.run(self._main_task())
  File "/usr/lib/python3.11/asyncio/runners.py", line 186, in run
    raise RuntimeError(
RuntimeError: asyncio.run() cannot be called from a running event loop
sys:1: RuntimeWarning: coroutine 'ZMQTerminalInteractiveShell._main_task' was never awaited

Here is the output of the inxi command

system:
  Kernel: 6.1.69-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
    clocksource: tsc available: hpet,acpi_pm
    parameters: BOOT_IMAGE=/boot/vmlinuz-6.1-x86_64
    root=UUID=2067097a-1b2e-4759-8bf3-1b5398b38c34 rw quiet
    resume=UUID=9ed2f32f-2361-4e95-8608-3b42c3ba2478
  Desktop: KDE Plasma v: 5.27.10 tk: Qt v: 5.15.11 wm: kwin_x11 vt: 2
    dm: SDDM Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: HP product: HP ProBook 450 G3 v: N/A
    serial: <superuser required> Chassis: type: 10 serial: <superuser required>
  Mobo: HP model: 8101 v: KBC Version 40.73 serial: <superuser required>
    UEFI: HP v: N78 Ver. 01.61 date: 10/03/2023
Battery:
  ID-1: BAT0 charge: 26.7 Wh (79.7%) condition: 33.5/44.4 Wh (75.5%)
    volts: 16.4 min: 14.8 model: Hewlett-Packard Primary type: Li-ion
    serial: <filter> status: not charging cycles: 51
CPU:
  Info: model: Intel Core i5-6200U bits: 64 type: MT MCP arch: Skylake
    gen: core 6 level: v3 note: check built: 2015 process: Intel 14nm family: 6
    model-id: 0x4E (78) stepping: 3 microcode: 0xF0
  Topology: cpus: 1x cores: 2 tpc: 2 threads: 4 smt: enabled cache:
    L1: 128 KiB desc: d-2x32 KiB; i-2x32 KiB L2: 512 KiB desc: 2x256 KiB
    L3: 3 MiB desc: 1x3 MiB
  Speed (MHz): avg: 1154 high: 1184 min/max: 400/2800 scaling:
    driver: intel_pstate governor: powersave cores: 1: 1121 2: 1184 3: 1132
    4: 1180 bogomips: 19204
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
  Vulnerabilities:
  Type: gather_data_sampling status: Vulnerable: No microcode
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf mitigation: PTE Inversion; VMX: conditional cache flushes, SMT
    vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: mmio_stale_data mitigation: Clear CPU buffers; SMT vulnerable
  Type: retbleed mitigation: IBRS
  Type: spec_rstack_overflow status: Not affected
  Type: spec_store_bypass mitigation: Speculative Store Bypass disabled via
    prctl
  Type: spectre_v1 mitigation: usercopy/swapgs barriers and __user pointer
    sanitization
  Type: spectre_v2 mitigation: IBRS, IBPB: conditional, STIBP: conditional,
    RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds mitigation: Microcode
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel Skylake GT2 [HD Graphics 520] vendor: Hewlett-Packard
    driver: i915 v: kernel arch: Gen-9 process: Intel 14n built: 2015-16 ports:
    active: eDP-1 empty: DP-1,HDMI-A-1,HDMI-A-2 bus-ID: 00:02.0
    chip-ID: 8086:1916 class-ID: 0300
  Device-2: AMD Topaz XT [Radeon R7 M260/M265 / M340/M360 M440/M445 530/535
    620/625 Mobile] vendor: Hewlett-Packard driver: amdgpu v: kernel
    arch: GCN-3 code: Volcanic Islands process: TSMC 28nm built: 2014-19 pcie:
    gen: 1 speed: 2.5 GT/s lanes: 4 link-max: gen: 3 speed: 8 GT/s lanes: 8
    bus-ID: 01:00.0 chip-ID: 1002:6900 class-ID: 0380 temp: 50.0 C
  Device-3: Cheng Uei Precision Industry (Foxlink) HP HD Camera
    driver: uvcvideo type: USB rev: 2.0 speed: 480 Mb/s lanes: 1 mode: 2.0
    bus-ID: 1-6:3 chip-ID: 05c8:0383 class-ID: 0e02
  Display: x11 server: X.Org v: 21.1.10 with: Xwayland v: 23.2.3
    compositor: kwin_x11 driver: X: loaded: intel dri: i965 gpu: i915
    display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 mapped: eDP1 model: AU Optronics 0x36ed built: 2014
    res: 1920x1080 hz: 60 dpi: 143 gamma: 1.2 size: 340x190mm (13.39x7.48")
    diag: 394mm (15.5") ratio: 16:9 modes: 1920x1080
  API: EGL v: 1.5 hw: drv: intel iris drv: amd radeonsi platforms: device: 0
    drv: iris device: 1 drv: radeonsi device: 2 drv: swrast gbm: drv: iris
    surfaceless: drv: radeonsi x11: drv: iris inactive: wayland
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: intel mesa v: 23.1.9-manjaro1.1
    glx-v: 1.4 direct-render: yes renderer: Mesa Intel HD Graphics 520 (SKL GT2)
    device-ID: 8086:1916 memory: 7.48 GiB unified: yes
  API: Vulkan v: 1.3.274 layers: N/A device: 0 type: discrete-gpu name: AMD
    Radeon R7 M340 (RADV ICELAND) driver: mesa radv v: 23.1.9-manjaro1.1
    device-ID: 1002:6900 surfaces: xcb,xlib device: 1 type: integrated-gpu
    name: Intel HD Graphics 520 (SKL GT2) driver: mesa intel
    v: 23.1.9-manjaro1.1 device-ID: 8086:1916 surfaces: xcb,xlib
Audio:
  Device-1: Intel Sunrise Point-LP HD Audio vendor: Hewlett-Packard
    driver: snd_hda_intel v: kernel alternate: snd_soc_skl, snd_soc_avs,
    snd_sof_pci_intel_skl bus-ID: 00:1f.3 chip-ID: 8086:9d70 class-ID: 0403
  API: ALSA v: k6.1.69-1-MANJARO status: kernel-api with: aoss
    type: oss-emulator tools: alsactl,alsamixer,amixer
  Server-1: sndiod v: N/A status: off tools: aucat,midicat,sndioctl
  Server-2: JACK v: 1.9.22 status: off tools: N/A
  Server-3: PipeWire v: 1.0.0 status: off with: pipewire-media-session
    status: active tools: pw-cli
  Server-4: PulseAudio v: 16.1 status: active with: 1: pulseaudio-alsa
    type: plugin 2: pulseaudio-jack type: module tools: pacat,pactl
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Hewlett-Packard driver: r8168 v: 8.052.01-NAPI modules: r8169 pcie:
    gen: 1 speed: 2.5 GT/s lanes: 1 port: 4000 bus-ID: 02:00.0
    chip-ID: 10ec:8168 class-ID: 0200
  IF: enp2s0 state: down mac: <filter>
  Device-2: Intel Wireless 3165 driver: iwlwifi v: kernel pcie: gen: 1
    speed: 2.5 GT/s lanes: 1 bus-ID: 03:00.0 chip-ID: 8086:3165 class-ID: 0280
  IF: wlp3s0 state: up mac: <filter>
  IF-ID-1: ipv6leakintrf0 state: unknown speed: N/A duplex: N/A mac: <filter>
Bluetooth:
  Device-1: Intel Bluetooth wireless interface driver: btusb v: 0.8 type: USB
    rev: 2.0 speed: 12 Mb/s lanes: 1 mode: 1.1 bus-ID: 1-7:4 chip-ID: 8087:0a2a
    class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 7 state: down bt-service: enabled,running
    rfk-block: hardware: no software: yes address: see --recommends
Drives:
  Local Storage: total: 931.51 GiB used: 288.8 GiB (31.0%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: Samsung model: ST1000LM024 HN-M101MBB
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
    tech: HDD rpm: 5400 serial: <filter> fw-rev: 0001 scheme: GPT
Partition:
  ID-1: / raw-size: 49.4 GiB size: 48.32 GiB (97.82%) used: 38.02 GiB (78.7%)
    fs: ext4 dev: /dev/sda10 maj-min: 8:10
  ID-2: /boot/efi raw-size: 360 MiB size: 356 MiB (98.89%)
    used: 90.1 MiB (25.3%) fs: vfat dev: /dev/sda1 maj-min: 8:1
  ID-3: /home raw-size: 281.86 GiB size: 277.25 GiB (98.36%)
    used: 249.44 GiB (90.0%) fs: ext4 dev: /dev/sda11 maj-min: 8:11
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default) zswap: yes
    compressor: zstd max-pool: 20%
  ID-1: swap-1 type: partition size: 16.62 GiB used: 1.34 GiB (8.0%)
    priority: -2 dev: /dev/sda7 maj-min: 8:7
Sensors:
  System Temperatures: cpu: 49.0 C pch: 49.0 C mobo: N/A gpu: amdgpu
    temp: 50.0 C
  Fan Speeds (rpm): N/A
Info:
  Processes: 255 Uptime: 2d 4h 20m wakeups: 3 Memory: total: 8 GiB note: est.
  available: 7.66 GiB used: 4.93 GiB (64.4%) Init: systemd v: 254
  default: graphical tool: systemctl Compilers: gcc: 13.2.1 clang: 16.0.6
  Packages: pm: pacman pkgs: 1871 libs: 367 tools: octopi,pacaur Shell: Bash
  v: 5.2.21 running-in: konsole inxi: 3.3.31

How to fix this ?

No idea, but it works fine on Arch with:

Packages (26) ipython-8.20.0-1  python-asttokens-2.4.1-1  python-comm-0.2.1-1  python-dateutil-2.8.2-6
python-decorator-5.1.1-3  python-executing-2.0.0-1  python-importlib-metadata-5.0.0-5
python-ipykernel-6.28.0-1  python-jedi-0.19.1-1  python-jupyter-client-8.6.0-1  python-jupyter-core-5.7.1-1
python-matplotlib-inline-0.1.6-4  python-nest-asyncio-1.5.8-1  python-parso-1:0.8.3-2  python-pexpect-4.9.0-1
python-prompt_toolkit-3.0.43-1  python-ptyprocess-0.7.0-5  python-pure-eval-0.2.2-3  python-pygments-2.17.2-1
python-pyzmq-25.1.2-1  python-stack-data-0.6.3-1  python-tornado-6.3.2-1  python-traitlets-5.14.1-1
python-wcwidth-0.2.12-1  python-zipp-3.17.0-1  jupyter-console-6.6.3-2

How did you install it?

How did you install the package and did you ever use pip?

I installed the jupyter-console package using octopi.

Yes I used pip to install some python modules.

Remove those then.

Do I have to remove them all even if still need some of them?

Check 2nd post. You should remove any of those.

Sorry what do you mean ?
Ah ok I get it!

If you have installed to system python - all you have used must be removed and installed using pacman.

1 Like

How to remove pip installed packages without system packages being affected ?

Why would system packages be affected…unless you used sudo pip? Just reinstall system ones afterwards then.

Yes indeed I used sudo pip install.
Is there another way to proceed apart from sudo pip uninsall ...?

What’s wrong with sudo pip uninstall? You could overwrite everything, but that is the worse way.

Should I go ahead with sudo pip freeeze | xargs pip uninstall -y --break-system-packages ???

I’m not using pip so I have no idea.
Can you post output of

sudo pip freeze

pip freeze output:

annotated-types==0.6.0
apparmor==3.1.6
appdirs==1.4.4
arandr==0.1.11
argcomplete==2.0.0
asttokens==2.4.1
attrs==23.1.0
autocommand==2.2.2
autopep8==2.0.4
bcrypt==4.1.2
beautifulsoup4==4.12.2
btrfsutil==6.6.3
CacheControl==0.13.1
certifi==2023.11.17
cffi==1.16.0
chardet==5.2.0
charset-normalizer==3.3.2
colorama==0.4.6
comm==0.2.0
coverage==6.5.0
cryptography==41.0.7
cssselect==1.2.0
dbus-python==1.3.2
debugpy==1.8.0
decorator==5.1.1
distro==1.8.0
dnspython==2.4.2
docopt==0.6.2
entrypoints==0.4
evillimiter==1.5.0
executing==2.0.0
fastjsonschema==2.19.1
filelock==3.13.1
flake8==6.1.0
gpg==1.23.2
graphviz==0.20.1
gufw==24.4.0
idna==3.5
importlib-metadata==5.0.0
inflect==7.0.0
ipykernel==6.28.0
ipython==8.19.0
ipython-genutils==0.2.0
jaraco.classes==3.3.0
jaraco.context==4.3.0
jaraco.functools==3.9.0
jaraco.text==3.11.1
jedi==0.19.1
jeepney==0.8.0
Jinja2==3.1.2
jupyter-console==6.6.3
jupyter_client==8.6.0
jupyter_core==5.6.0
keyring==24.3.0
keyutils==0.6
LibAppArmor==3.1.6
lockfile==0.12.2
lxml==4.9.2
MarkupSafe==2.1.3
matplotlib-inline==0.1.6
mccabe==0.7.0
more-itertools==10.1.0
msgpack==1.0.5
nest-asyncio==1.5.7
netaddr==0.8.0
netifaces==0.11.0
netsnmp-python==1.0a1
nftables==0.1
npyscreen==4.10.5
numpy==1.26.2
onboard==1.4.1
ordered-set==4.1.0
packaging==23.2
pacman_mirrors==4.24.0
parso==0.8.3
pexpect==4.9.0
pickleshare==0.7.5
Pillow==10.1.0
platformdirs==4.1.0
ply==3.11
prompt-toolkit==3.0.43
proton-client==0.7.1
protonvpn-cli==3.13.0
protonvpn-gui==1.12.0
protonvpn-nm-lib==3.16.0
psutil==5.9.6
ptyprocess==0.7.0
pure-eval==0.2.2
pycairo==1.25.1
pycodestyle==2.11.1
pycparser==2.21
pycryptodomex==3.12.0
pydantic==2.5.2
pydantic_core==2.14.5
pyflakes==3.1.0
Pygments==2.17.2
PyGObject==3.46.0
pyOpenSSL==23.3.0
PyQt5==5.15.10
PyQt5-sip==12.13.0
PyQt6==6.6.1
PyQt6-sip==13.6.0
pyserial==3.5
PySocks==1.7.1
python-dateutil==2.8.2
python-gnupg==0.5.2
pythondialog==3.5.3
pyxdg==0.28
PyYAML==6.0.1
pyzmq==25.1.2
qtconsole==5.5.1
QTermWidget==1.4.0
QtPy==2.4.0
Quamash==0.6.1
requests==2.31.0
scapy==2.5.0
scour==0.38.2
SecretStorage==3.3.3
simplejson==3.19.2
six==1.16.0
smbus==1.1
soupsieve==2.5
stack-data==0.6.3
systemd-python==235
terminaltables==3.1.0
tomli==2.0.1
torbrowser-launcher==0.3.6
tornado==6.3.2
tqdm==4.66.1
traitlets==5.14.0
trove-classifiers==2023.12.1
typing_extensions==4.9.0
udiskie==2.5.1
ufw==0.36.2
urllib3==1.26.18
validate-pyproject==0.13.post1.dev0+gb752273.d20230520
wcwidth==0.2.12
zipp==3.17.0
zstandard==0.22.0

What happens if you just reinstall jupyter-console

pacman -Syu jupyter-console

Nothing new, same issue.

Please post full output of reinstall.