我最近卸载了Anaconda3并在Python 2上重新安装了Anaconda。接下来,当我使用jupyter笔记本时,似乎无法运行内核。我在尝试打开的任何笔记本上都出现此内核错误:
无法启动内核
Traceback (most recent call last):
File "C:\Users\Ejer\Anaconda2\lib\site-packages\notebook\base\handlers.py", line 516, in wrapper
result = yield gen.maybe_future(method(self, *args, **kwargs))
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\notebook\services\sessions\handlers.py", line 75, in post
type=mtype))
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 1055, in run
value = future.result()
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\tornado\gen.py", line 307, in wrapper
yielded = next(result)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 94, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 257, in start_kernel
**kw)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\jupyter_client\manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "C:\Users\Ejer\Anaconda2\lib\site-packages\jupyter_client\launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "C:\Users\Ejer\Anaconda2\lib\subprocess.py", line 390, in __init__
errread, errwrite)
File "C:\Users\Ejer\Anaconda2\lib\subprocess.py", line 640, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
答案 0 :(得分:0)
你的意思是你卸载了python 3并安装了python2?假设这是您所做的,右键单击anacona提示并以管理员身份运行尝试在管理模式下运行命令提示符后运行此命令
if (xmlHttp.status==200)
{
if(type != null && type.toUpperCase() == "XML")
result = xmlHttp.responseXML;
else
result = xmlHttp.responseText;
document.write('result: ' + result + '<br>');
if(onloadFunction != null && onloadFunction.length > 0)
{
document.write('onloadFunction: ' + onloadFunction + '<br>');
}
}
或
python2 -m pip install ipykernel
答案 1 :(得分:0)
这可能是因为juypter无法找到python。
尝试在anaconda安装中查看share / jupyter / kernels // kernel.json,您会看到类似的内容。
GeometryReader
确保argv下的python路径正确。