Score:0

Jupyter notebook is not running [PermissionError: [Errno 13] Permission denied: '/home/user]

cn flag

I have tried to uninstall jupyter notebook using the command pip uninstall jupyter_core and installed it again but it didn't work. Also tried this command pip-autoremove jupyter -y and installed it again also didn't work. Also uninstalled it and tried this command to remove the cache from the snapd folder sudo sh -c 'rm -rf /var/lib/snapd/cache/*' didn't work again.

I have tried my best please help me

abuhaithem@abuhaithem:~$ jupyter notebook
Traceback (most recent call last):
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/traitlets/traitlets.py", line 645, in get
    value = obj._trait_values[self.name]
KeyError: 'runtime_dir'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/abuhaithem/.local/bin/jupyter-notebook", line 8, in <module>
    sys.exit(main())
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/jupyter_core/application.py", line 269, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/traitlets/config/application.py", line 981, in launch_instance
    app.initialize(argv)
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/traitlets/config/application.py", line 110, in inner
    return method(app, *args, **kwargs)
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/notebook/notebookapp.py", line 2147, in initialize
    self.init_configurables()
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/notebook/notebookapp.py", line 1649, in init_configurables
    connection_dir=self.runtime_dir,
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/traitlets/traitlets.py", line 686, in __get__
    return self.get(obj, cls)
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/traitlets/traitlets.py", line 648, in get
    default = obj.trait_defaults(self.name)
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/traitlets/traitlets.py", line 1752, in trait_defaults
    return self._get_trait_default_generator(names[0])(self)
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/jupyter_core/application.py", line 106, in _runtime_dir_default
    ensure_dir_exists(rd, mode=0o700)
  File "/home/abuhaithem/.local/lib/python3.10/site-packages/jupyter_core/utils/__init__.py", line 12, in ensure_dir_exists
    os.makedirs(path, mode=mode)
  File "/usr/lib/python3.10/os.py", line 215, in makedirs
    makedirs(head, exist_ok=exist_ok)
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
PermissionError: [Errno 13] Permission denied: '/home/user'
Score:0
cn flag

I have found the answer

1. first open your terminal and uninstall the jupyter notebook
pip uninstall jupyter_core
2. after that type the following
ls -a
3. after that delete the .cache folder
rm -r .cache
4. and also delete this folder
rm -r .pam_environment
5. after this all steps finally reinstall the jupyter notebook again
pip install notebook

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.