【问题标题】:Jupyter notebook Application launch errorJupyter notebook 应用程序启动错误
【发布时间】:2020-10-22 21:35:23
【问题描述】:

当我尝试从 Anaconda3 启动 Jupyter 笔记本时,我收到此应用程序启动错误:

Fail to get yarn configuration. /root/anaconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js:1175
var _ref27 = (0, (_asyncToGenerator2 || _load_asyncToGenerator()).default)(function* (dir, relativeDir, ignoreBasenames = new Set()) {
^

SyntaxError: Unexpected token =
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Function.Module.runMain (module.js:441:10)
at startup (node.js:140:18)
at node.js:1043:3

[I 22:16:35.920 NotebookApp] JupyterLab extension loaded from /root/anaconda3/lib/python3.8/site-packages/jupyterlab
[I 22:16:35.920 NotebookApp] JupyterLab application directory is /root/anaconda3/share/jupyter/lab
[C 22:16:35.923 NotebookApp] Running as root is not recommended. Use --allow-root to bypass.

我正在使用kali linux,我尝试更新jupyter但没有任何改变。

【问题讨论】:

  • 错误很明显 - 你试图以 root 身份运行 Jupyter,这是一个非常糟糕的主意。如果需要,创建一个具有sudo 权限的普通用户,并以该用户的身份进行工作。以 root 身份运行的命令中的单个字符错误可能会破坏整个系统。
  • 您好,感谢您的快速回答,我从 anaconda3 而非终端启动 jupyter,那么哪一行代码可以解决此问题?当我在我的机器上设置 kali linux 时,我将它修复为 root
  • 您解决了这个问题吗?

标签: python linux jupyter-notebook anaconda jupyter-lab


【解决方案1】:

更新 nodejs 为我解决了这个问题

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
apt-get install -y nodejs

你可以参考这个链接https://github.com/yarnpkg/yarn/issues/6914

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2020-06-19
    • 1970-01-01
    • 2018-07-06
    • 2018-10-05
    • 2019-08-07
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多