• 今天遇到的“OS ERROR, permission denied” 如何解决的


    lirh@ubuntu:~$ jupyter notebook
    Traceback (most recent call last):
    File "/home/lirh/.local/lib/python3.5/site-packages/traitlets/traitlets.py", line 528, 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 "/usr/local/bin/jupyter-notebook", line 11, in <module>
    sys.exit(main())
    File "/home/lirh/.local/lib/python3.5/site-packages/jupyter_core/application.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
    File "/home/lirh/.local/lib/python3.5/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
    File "<decorator-gen-7>", line 2, in initialize
    File "/home/lirh/.local/lib/python3.5/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
    File "/home/lirh/.local/lib/python3.5/site-packages/notebook/notebookapp.py", line 1140, in initialize
    self.init_configurables()
    File "/home/lirh/.local/lib/python3.5/site-packages/notebook/notebookapp.py", line 901, in init_configurables
    connection_dir=self.runtime_dir,
    File "/home/lirh/.local/lib/python3.5/site-packages/traitlets/traitlets.py", line 556, in __get__
    return self.get(obj, cls)
    File "/home/lirh/.local/lib/python3.5/site-packages/traitlets/traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
    File "/home/lirh/.local/lib/python3.5/site-packages/jupyter_core/application.py", line 99, in _runtime_dir_default
    ensure_dir_exists(rd, mode=0o700)
    File "/home/lirh/.local/lib/python3.5/site-packages/ipython_genutils/path.py", line 167, in ensure_dir_exists
    os.makedirs(path, mode=mode)
    File "/usr/lib/python3.5/os.py", line 231, in makedirs
    makedirs(head, mode, exist_ok)
    File "/usr/lib/python3.5/os.py", line 231, in makedirs
    makedirs(head, mode, exist_ok)
    File "/usr/lib/python3.5/os.py", line 231, in makedirs
    makedirs(head, mode, exist_ok)
    File "/usr/lib/python3.5/os.py", line 241, in makedirs
    mkdir(name, mode)
    PermissionError: [Errno 13] Permission denied: '/home/deploy'

    只要把命令改成:

    lirh@ubuntu:~$ sudo jupyter notebook

    就可以成功运行

  • 相关阅读:
    ACM 一种排序
    ACM Binary String Matching
    ACM 括号配对问题
    ACM BUYING FEED
    ACM 喷水装置(二)
    ACM 会场安排问题
    ACM 推桌子
    ACM 心急的C小加
    ACM 田忌赛马
    ACM 疯牛
  • 原文地址:https://www.cnblogs.com/quant-lee/p/6561671.html
Copyright © 2020-2023  润新知