Unable to detect Python kernels in VS Code Jupyter notebooks after migrating from Windows 11 to Arch Linux
1
vote
1
answer
760
views
### Environment Details
- **Previous OS**: Windows 11
- **Current OS**: Arch Linux
- **Desktop Environment**: KDE Plasma
- **IDE**: Visual Studio Code (**OSS CODE**)
- **Required Feature**: Jupyter Notebook support
## Issue Description
After migrating from Windows 11 to Arch Linux, I'm unable to get Jupyter notebooks working in VS Code. Specifically, VS Code cannot detect any Python kernels for the notebooks, preventing me from running any code.
## What I've Tried
### Attempt 1: Direct Installation
First, I attempted to install Jupyter directly using pip:
### Attempt 3: System Package Installation
I also attempted to install through pacman:
## System Configuration
- VS Code has the Python extension installed
- Python is installed and accessible from terminal
- Virtual environment is created but not being detected by VS Code
## Expected Behavior
VS Code should be able to:
1. Detect the Python interpreter in the virtual environment
2. List it as an available kernel for Jupyter notebooks
3. Allow running notebook cells using the selected kernel
## Actual Behavior
- No kernels are being detected
- Cannot run any notebook cells
- Kernel picker shows no available kernels
## Question
How can I properly configure VS Code to detect and use Python kernels for Jupyter notebooks on a fresh Arch Linux installation, considering the system package management restrictions?
pip install jupyter --break-system-packages
This resulted in an error about externally managed environment, which is expected behavior in Arch Linux.
### Attempt 2: Virtual Environment Setup
Then I tried setting up a virtual environment:
python -m venv .venv
source .venv/bin/activate
pip install jupyter
This is the result I got:
[harshal@quanta ~]$ python -m venv .venv
[harshal@quanta ~]$ source .venv/bin/ativate
bash: .venv/bin/ativate: No such file or directory
[harshal@quanta ~]$ ls
Desktop Documents Downloads Music Pictures Public sof-bin Templates Videos yay
[harshal@quanta ~]$ source .venv/bin/activate
(.venv) [harshal@quanta ~]$ code .
(.venv) [harshal@quanta ~]$
**Code** :

sudo pacman -S python-jupyter
This failed with "target not found: python-jupyter" error.
### Output of ls -al .venv
drwxr-xr-x 7 harshal harshal 4096 Dec 20 18:57 .
drwx------ 22 harshal harshal 4096 Dec 21 08:03 ..
drwxr-xr-x 2 harshal harshal 4096 Dec 20 18:57 bin
drwxr-xr-x 3 harshal harshal 4096 Dec 20 18:57 etc
drwxr-xr-x 3 harshal harshal 4096 Dec 20 17:33 include
drwxr-xr-x 3 harshal harshal 4096 Dec 20 17:33 lib
lrwxrwxrwx 1 harshal harshal 3 Dec 20 17:33 lib64 -> lib
-rw-r--r-- 1 harshal harshal 157 Dec 20 18:54 pyvenv.cfg
drwxr-xr-x 6 harshal harshal 4096 Dec 20 18:57 share
[harshal@quanta ~]$
## Current State
Even after these attempts, VS Code still cannot detect any Python kernels for Jupyter notebooks, as shown in the screenshot below:

Asked by Harshal Malani
(11 rep)
Dec 20, 2024, 12:51 PM
Last activity: Jul 30, 2025, 01:45 PM
Last activity: Jul 30, 2025, 01:45 PM