Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows: ipykernel install prefix not usable for c:\programdata\jupyter

Open
#1,234 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
jupyter, python
Domain
cli, tooling

Research direction

Reproduce the behavior with jupyter --paths and python -m ipykernel install --name pytorch --prefix=C:\ProgramData\jupyter; then inspect the install-prefix code and the existing test that assumes the prefix layout. Done means a kernelspec installed with this Windows prefix is placed in and discovered from C:\ProgramData\jupyter\kernels.

Written by the indexing model from the issue text.

Description

On windows jupyter --paths gives

jupyter --paths
config:
    C:\tools\miniconda3\envs\pytorch\etc\jupyter
    C:\Users\Administrator\.jupyter
    C:\Users\Administrator\AppData\Roaming\Python\etc\jupyter
    C:\ProgramData\jupyter
data:
    C:\tools\miniconda3\envs\pytorch\share\jupyter
    C:\Users\Administrator\AppData\Roaming\jupyter
    C:\Users\Administrator\AppData\Roaming\Python\share\jupyter
    C:\ProgramData\jupyter
runtime:
    C:\Users\Administrator\AppData\Roaming\jupyter\runtime

And I'd like to use C:\ProgramData\jupyter to store kernelspecs from various different kernels from different envs (using miniconda at the moment)

Trying to do that...

(pytorch) PS C:\Users\Administrator> python -m ipykernel install --name pytorch --prefix=C:\ProgramData\jupyter
0.03s - 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.
[InstallIPythonKernelSpecApp] WARNING | Installing to C:\ProgramData\jupyter\share\jupyter\kernels, which is not in ['C:\\tools\\miniconda3\\envs\\pytorch\\share\\jupyter\\kernels', 'C:\\Users\\Administrator\\AppData\\Roaming\\jupyter\\kernels', 'C:\\Users\\Administrator\\AppData\\Roaming\\Python\\share\\jupyter\\kernels', 'C:\\ProgramData\\jupyter\\kernels', 'C:\\Users\\Administrator\\.ipython\\kernels']. The kernelspec may not be found.
Installed kernelspec pytorch in C:\ProgramData\jupyter\share\jupyter\kernels\pytorch

so somewhere (took a quick look at the code could only find a test that seemed to assume it would) "share" and "jupyter" added into prefix path before "kernels" so this kernel is not found.

moving C:\ProgramData\jupyter\share\jupyter\kernels\pytorch to C:\ProgramData\jupyter\kernels\pytorch means it gets found

perhaps a --raw-prefix, to which I'd pass C:\ProgramData\jupyter\kernels\ to, that left the prefix as given would solve this?

Dominant language
Python
Stars
734
Forks
411
Avg merge
1d 2h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from ipython/ipykernel

All issues in ipython/ipykernel

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.