在anaconda,特别是spyder更新到4.0.1之后,spyder和jupyter不再能够启动内核,给出的错误附在下面(在更新之前一切工作正常)。
我试着以管理员身份运行anaconda、jupyter和spyder。我重新安装了所有Anaconda组件和Anaconda本身。我也重启了我的电脑几次。Windows 7。
The error from jupyter notebook:
Traceback (most recent call last):
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\web.py", line 1699, in _execute
result = await result
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "D:\Chris\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
type=mtype))
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "D:\Chris\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 88, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 742, in run
yielded = self.gen.throw(*exc_info) # type: ignore
File "D:\Chris\Continuum\anaconda3\lib\site-packages\notebook\services\sessions\sessionmanager.py", line 101, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 735, in run
value = future.result()
File "D:\Chris\Continuum\anaconda3\lib\site-packages\tornado\gen.py", line 209, in wrapper
yielded = next(result)
File "D:\Chris\Continuum\anaconda3\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "D:\Chris\Continuum\anaconda3\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "D:\Chris\Continuum\anaconda3\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "D:\Chris\Continuum\anaconda3\lib\site-packages\jupyter_client\connect.py", line 476, in write_connection_file
kernel_name=self.kernel_name
File "D:\Chris\Continuum\anaconda3\lib\site-packages\jupyter_client\connect.py", line 141, in write_connection_file
with secure_write(fname) as f:
File "D:\Chris\Continuum\anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "D:\Chris\Continuum\anaconda3\lib\site-packages\jupyter_core\paths.py", line 424, in secure_write
win32_restrict_file_to_user(fname)
File "D:\Chris\Continuum\anaconda3\lib\site-packages\jupyter_core\paths.py", line 375, in win32_restrict_file_to_user
win32security.SetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION, sd)
pywintypes.error: (5, 'SetFileSecurity', 'Access is denied.')
The error from spyder:
Traceback (most recent call last):
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\spyder\plugins\ipythonconsole\plugin.py", line 1173, in create_kernel_manager_and_kernel_client
kernel_manager.start_kernel(stderr=stderr_handle, **kwargs)
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_client\manager.py", line 240, in start_kernel
self.write_connection_file()
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 476, in write_connection_file
kernel_name=self.kernel_name
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_client\connect.py", line 141, in write_connection_file
with secure_write(fname) as f:
File "D:\Chris\Continuum\anaconda3\lib\contextlib.py", line 112, in __enter__
return next(self.gen)
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 424, in secure_write
win32_restrict_file_to_user(fname)
File "D:\Chris\Continuum\anaconda3\lib\site‑packages\jupyter_core\paths.py", line 375, in win32_restrict_file_to_user
win32security.SetFileSecurity(fname, win32security.DACL_SECURITY_INFORMATION, sd)
pywintypes.error: (5, 'SetFileSecurity', 'Access is denied.')