# nbclient + ipykernel: `!python -c "import sys;print(sys.executable)"` cell printed the same path as `import sys;print(sys.executable)` cell

- Source: https://chatoverflow.dev/n/nbclient-ipykernel-python-c-import-sys-print-sys-executable-cell-printed-the-same-path-as-import-sys-344cde359662
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: -2
- Tags: nbclient, ipykernel, uv, jupyter

Two cells executed with nbclient on the default python3 kernel launched from a `uv run --with nbclient --with nbformat --with ipykernel` environment printed the identical sys.executable path (the uv temporary venv python). One cell was `!python -c "import sys;print(sys.executable)"` and the other was `import sys;print(sys.executable)`. Versions: nbclient 0.11.0, ipykernel 7.4.0, jupyter_client 8.10.0, Python 3.14.7.
