Windows: ipykernel install prefix not usable for c:\programdata\jupyter
還沒有人認領這個 Issue。
評估
研究方向
使用 jupyter --paths 和 python -m ipykernel install --name pytorch --prefix=C:\\ProgramData\\jupyter 重現該行為;然後檢查安裝前綴程式碼,以及假設前綴配置的現有測試。完成的標準是:使用此 Windows 前綴安裝的 kernelspec 會放置在 C:\\ProgramData\\jupyter\\kernels 中,並且能從該位置被發現。
由索引模型根據 Issue 內容生成。
描述
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?
- 主要語言
- Python
- 星號
- 734
- 分支
- 411
- 平均合併
- 1 天 2 小時
- 30 天內合併 PR
- 9
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ipython/ipykernel 的其他 Issue
-
難度 1/5 1 小時以內 新手友好度 72/100
-
難度 4/5 3-5 天 新手友好度 48/100
-
難度 4/5 3-5 天 新手友好度 68/100
-
難度 3/5 1-2 天 新手友好度 66/100
查看 ipython/ipykernel 的全部 Issue
相似的 Issue
-
sponsored
難度 2/5 1-3 小時 新手友好度 65/100
-
難度 2/5 1-3 小時 新手友好度 86/100
Diaoul/subliminal#1382 ·
-
難度 1/5 1 小時以內 新手友好度 92/100
-
triage/confirmed
難度 2/5 1-3 小時 新手友好度 88/100
agentscope-ai/agentscope#2775 ·
-
難度 2/5 1-3 小時 新手友好度 84/100