Kernel error (Errno 13 Permission denied) in Jupyter Notebook, Windows 10

13,200

Same exact problem here. What worked for me was running the Anaconda Navigator as an Administrator. Hope it works for you too.

Share:
13,200
Admin
Author by

Admin

Updated on June 19, 2022

Comments

  • Admin
    Admin almost 2 years

    I have installed Jupyter Notebook on Windows 10. I can execute jupyter notebook command. It opens and shows a list of current path directories. I also can create or open a notebook. But when I do it I get Kernel error in the top right corner. After clicking on it this window appears:

    Failed to start the kernel

    Unhandled error

    Traceback (most recent call last):
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\web.py", line 1699, in _execute
        result = await result
      File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 383, in __iter__
        return self.result()  # May raise too.
      File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
        raise self._exception
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\notebook\services\sessions\handlers.py", line 72, in post
        type=mtype))
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 735, in run
        value = future.result()
      File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
        raise self._exception
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "c:\users\lola\appdata\local\programs\python\python35\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 "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 735, in run
        value = future.result()
      File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
        raise self._exception
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 742, in run
        yielded = self.gen.throw(*exc_info)  # type: ignore
      File "c:\users\lola\appdata\local\programs\python\python35\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 "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 735, in run
        value = future.result()
      File "c:\users\lola\appdata\local\programs\python\python35\lib\asyncio\futures.py", line 294, in result
        raise self._exception
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\tornado\gen.py", line 209, in wrapper
        yielded = next(result)
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\notebook\services\kernels\kernelmanager.py", line 168, in start_kernel
        super(MappingKernelManager, self).start_kernel(**kwargs)
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\multikernelmanager.py", line 110, in start_kernel
        km.start_kernel(**kwargs)
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\manager.py", line 240, in start_kernel
        self.write_connection_file()
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\connect.py", line 547, in write_connection_file
        kernel_name=self.kernel_name
      File "c:\users\lola\appdata\local\programs\python\python35\lib\site-packages\jupyter_client\connect.py", line 212, in write_connection_file
        with secure_write(fname) as f:
      File "c:\users\lola\appdata\local\programs\python\python35\lib\contextlib.py", line 59, in __enter__
        return next(self.gen)
      File "c:\users\lola\appdata\local\programs\python\python35\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\\Lola\\AppData\\Roaming\\jupyter\\runtime\\kernel-fd884f4e-8208-4b8e-9db2-c048f869e042.json'
    

    The code in my file is not highlighted in different colors and when I run it nothing happens.

    I am new to programming, so please try to give advice in simple words, describing each step in detail.

    In the past, I've tried to delete Python, install Python in different versions, install Anaconda. In addition, in order to work with tensorflow, I've created a special environment. But this error stays the same. I suspect the problem is a double backslash ("//") in the path, but I have absolutely no idea how to fix this. But perhaps the problem is something else.