远程服务器上的Anaconda Jupyter Lab:权限错误

时间:2019-09-30 01:13:40

标签: anaconda jupyter-lab

错误如下: PermissionError:[Errno 13]权限被拒绝:'/home/ubuntu/.jupyter/jupyter_no tebook_config.json'

相关问题是: Jupyter notebook permission error Could not install packages due to a "Environment error :[error 13]: permission denied : 'usr/local/bin/f2py'"

计算机-Ubuntu 16.04,已安装Conda。

我知道我在该远程服务器上没有root用户-但是如果使用正确的命令,也许我可以拥有root用户。

请注意jupyter lab命令正在尝试访问jupyter lab的非conda安装(配置文件/home/ubuntu/.jupyter)。我想从anaconda 3安装文件夹访问conda安装-请参阅完整错误以供参考。任何建议/想法都将受到欢迎,并将收到数量惊人的冰雹玛丽。感谢您的关注。或者,也许我可以找到一些方法将jupyter -lab指向conda配置。

完全错误

    ubuntu@96-76-203-14:~$ jupyter lab
[E 00:58:14.174 LabApp] Exception while loading config file /home/ubuntu/.jupyte                                                                                                                                                             r/jupyter_notebook_config.json
    Traceback (most recent call last):
      File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/traitlets/config/                                                                                                                                                             application.py", line 562, in _load_config_files
        config = loader.load_config()
      File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/traitlets/config/                                                                                                                                                             loader.py", line 406, in load_config
        dct = self._read_file_as_dict()
      File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/traitlets/config/                                                                                                                                                             loader.py", line 411, in _read_file_as_dict
        with open(self.full_filename) as f:
    PermissionError: [Errno 13] Permission denied: '/home/ubuntu/.jupyter/jupyte                                                                                                                                                             r_notebook_config.json'
[I 00:58:14.188 LabApp] The port 7000 is already in use, trying another port.
Traceback (most recent call last):
  File "/home/ubuntu/anaconda3/bin/jupyter-lab", line 11, in <module>
    sys.exit(main())
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/jupyter_core/applicat                                                                                                                                                             ion.py", line 267, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/traitlets/config/appl                                                                                                                                                             ication.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/traitlets/config/appl                                                                                                                                                             ication.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.                                                                                                                                                             py", line 1299, in initialize
    self.init_server_extensions()
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/jupyterlab/labapp.py"                                                                                                                                                             , line 209, in init_server_extensions
    super(LabApp, self).init_server_extensions()
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/notebook/notebookapp.                                                                                                                                                             py", line 1258, in init_server_extensions
    section = manager.get(self.config_file_name)
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/notebook/services/con                                                                                                                                                             fig/manager.py", line 25, in get
    recursive_update(config, cm.get(section_name))
  File "/home/ubuntu/anaconda3/lib/python3.6/site-packages/traitlets/config/mana                                                                                                                                                             ger.py", line 62, in get
    with io.open(filename, encoding='utf-8') as f:
PermissionError: [Errno 13] Permission denied: '/home/ubuntu/.jupyter/jupyter_no                                                                                                                                                             tebook_config.json'

更新

因此,我只是尝试使用jupyter笔记本,它起作用了,但并没有以一种奇怪的神秘方式向我展示令牌,只是三个点……(是的,确实如此)

ubuntu@96-76-203-14:~/anaconda3$ jupyter notebook
[I 01:41:12.637 NotebookApp] Writing notebook server cookie secret to /run/user/1000/jupyter/not                                          ebook_cookie_secret
[I 01:41:12.649 NotebookApp] The port 7000 is already in use, trying another port.
[I 01:41:12.653 NotebookApp] Serving notebooks from local directory: /home/ubuntu/anaconda3
[I 01:41:12.654 NotebookApp] 0 active kernels
[I 01:41:12.654 NotebookApp] The Jupyter Notebook is running at: http://0.0.0.0:7001/?token=...
[I 01:41:12.654 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice                                           to skip confirmation).
[W 01:41:12.654 NotebookApp] No web browser found: could not locate runnable browser.
^C[I 01:41:25.822 NotebookApp] interrupted
Serving notebooks from local directory: /home/ubuntu/anaconda3
0 active kernels
The Jupyter Notebook is running at: http://0.0.0.0:7001/?token=...

1 个答案:

答案 0 :(得分:0)

尝试删除此文件夹并进行检查。有时这可以解决权限问题

'/Users/ArcherWoo/.jupyter

此外,尝试从子目录而不是主目录的根目录运行jupyter。

添加别忘了给目录chmod 777授予权限