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
Copy file name to clipboardExpand all lines: DEEPNOTE_KERNEL_IMPLEMENTATION.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,9 +43,9 @@ This implementation adds automatic kernel selection and startup for `.deepnote`
43
43
- Finds an available port (starting from 8888)
44
44
- Starts the server with `python -m deepnote_toolkit server --jupyter-port <port>`
45
45
-**Sets environment variables** so shell commands use the venv's Python:
46
-
- Prepends venv's bin directory to `PATH` (POSIX: `<venv>/bin`, Windows: `<venv>\Scripts`)
47
-
- Sets `VIRTUAL_ENV` to the venv path (both platforms)
48
-
- Removes `PYTHONHOME` to avoid conflicts (both platforms)
46
+
- Prepends venv's bin directory to `PATH`
47
+
- Sets `VIRTUAL_ENV` to the venv path
48
+
- Removes `PYTHONHOME` to avoid conflicts
49
49
- Monitors server output and logs it
50
50
- Waits for server to be ready before returning connection info
51
51
- Reuses existing server for the same `.deepnote` file if already running
@@ -383,9 +383,9 @@ These changes ensure that Deepnote notebooks can execute cells reliably by:
383
383
384
384
2.**Environment variable configuration** (ensures shell commands use venv Python):
385
385
- When starting the Jupyter server, set environment variables:
386
-
- Prepend venv's bin directory to `PATH` (POSIX: `<venv>/bin`, Windows: `<venv>\Scripts`)
387
-
- Set `VIRTUAL_ENV` to point to the venv (both platforms)
388
-
- Remove `PYTHONHOME` (can interfere with venv, both platforms)
386
+
- Prepend venv's `bin/` directory to `PATH`
387
+
- Set `VIRTUAL_ENV` to point to the venv
388
+
- Remove `PYTHONHOME` (can interfere with venv)
389
389
- This ensures `!pip install` and other shell commands use the venv's Python
390
390
391
391
**Result**: Both the kernel and shell commands now use the same Python environment (the venv), so packages installed via `!pip install` or `%pip install` are immediately available for import.
0 commit comments