python-kenel错误:PermissionError:[Errno 13]权限被拒绝:

时间:2019-10-09 15:57:07

标签: python django python-3.x tensorflow jupyter-notebook

我设置了张量流环境。我想检查一下它是否运作良好。所以我打开了Jupyter Notebook

当我打开Jupyter Notebook并建立一个新文件时,它显示kenel错误。

Traceback (most recent call last):
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\tornado\web.py", line 1699, in _execute
    result = await result
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
    type=mtype))
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "D:\Anaconda3\envs\tensor36\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:\Anaconda3\envs\tensor36\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\tornado\gen.py", line 742, in run
    yielded = self.gen.throw(*exc_info)  # type: ignore
  File "D:\Anaconda3\envs\tensor36\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:\Anaconda3\envs\tensor36\lib\site-packages\tornado\gen.py", line 735, in run
    value = future.result()
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\tornado\gen.py", line 209, in wrapper
    yielded = next(result)
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
    super(MappingKernelManager, self).start_kernel(**kwargs)
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
    km.start_kernel(**kwargs)
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
    self.write_connection_file()
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
    kernel_name=self.kernel_name
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
    with secure_write(fname) as f:
  File "D:\Anaconda3\envs\tensor36\lib\contextlib.py", line 81, in __enter__
    return next(self.gen)
  File "D:\Anaconda3\envs\tensor36\lib\site-packages\jupyter_client\connect.py", line 102, in secure_write
    with os.fdopen(os.open(fname, open_flag, 0o600), mode) as f:
PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Huazhi\\AppData\\Roaming\\jupyter\\runtime\\kernel-c1e93dc8-b336-4fdd-a028-7c001460bc4f.json'

2 个答案:

答案 0 :(得分:0)

也许这可以解决这个问题:

启动Anaconda Prompt时,右键单击并选择“使用管理员帐户运行程序”,然后输入“ jupyter笔记本”,然后按Enter打开笔记本,即可正常使用。

答案 1 :(得分:0)

尝试将jupyter笔记本降级到5.3.1版。

   await interpreter.run(
      localModelName: modelName,
      inputOutputOptions: io, 
      inputBytes: bytes
    );