配置Wolfram-Mathematica Jupyter内核时提示jupyter-kernelspec未找到
解决Jupyter添加Wolfram内核时
jupyter-kernelspec未找到的问题 问题描述
执行./configure-jupyter.wls add命令将Wolfram-Mathematica内核添加到Jupyter时,系统返回错误:Jupyter command 'jupyter-kernelspec' not found,完整报错信息如下:
root@Lenovo-G50-45:/home/laptop/Documentos/Anton_Lap/1unitec/Practicarios_UNUTEC/WolframLanguageForJupyter-master# ./configure-jupyter.wls add configure-jupyter.wls: An error has occurred. The desired Wolfram Engine is not in "jupyter kernelspec list." configure-jupyter.wls: See below for the message that Jupyter returned when attempting to add the Wolfram Engine. usage: jupyter [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir] [--paths] [--json] [--debug] [subcommand] Jupyter: Interactive Computing positional arguments: subcommand the subcommand to launch options: -h, --help show this help message and exit --version show the versions of core jupyter packages and exit --config-dir show Jupyter config dir --data-dir show Jupyter data dir --runtime-dir show Jupyter runtime dir --paths show all Jupyter paths. Add --json for machine-readable format. --json output paths as machine-readable json --debug output debug information about paths Available subcommands: bundlerextension execute migrate nbextension notebook serverextension troubleshoot Jupyter command `jupyter-kernelspec` not found.
解决方案
安装
jupyter-client包:jupyter-kernelspec是jupyter-client的核心组件,执行以下命令安装(根据Python版本选择pip或pip3):pip3 install jupyter-client若权限不足,添加
--user参数安装到用户目录:pip3 install --user jupyter-client验证命令可用性:安装完成后,执行
jupyter kernelspec list,若能正常输出已安装的内核列表,说明组件已就绪。修复环境变量PATH:如果仍提示找不到命令,先定位
jupyter-kernelspec的路径:which jupyter-kernelspec将输出路径所在的目录(如
/home/user/.local/bin)添加到系统PATH:export PATH=$PATH:/home/user/.local/bin若需永久生效,可将该命令写入
~/.bashrc或~/.zshrc配置文件。重新执行配置命令:完成上述步骤后,再次运行
./configure-jupyter.wls add即可尝试添加Wolfram内核。
内容的提问来源于stack exchange,提问作者anton valedes
相关产品推荐
相关产品推荐

