Plotly 安装 - RuntimeError: JupyterLab 无法构建

时间:2021-02-25 21:13:45

标签: python node.js npm plotly jupyter-lab

我正在尝试按照说明 here 将 Plotly 扩展安装到我的 Jupyter Lab 环境中。

但是,当我运行 jupyter labextension install jupyterlab-plotly@4.14.3 时,我得到

Building jupyterlab assets (build:prod:minimize)
An error occured.
RuntimeError: JupyterLab failed to build
See the log file for details:  /tmp/jupyterlab-debug-l7o8nq7l.log

我在下面包含了日志文件。抱歉,篇幅太长,但在尝试了解日志文件后,我不知道如何解决此问题。

Node v10.19.0

Yarn configuration loaded.
> /usr/bin/npm pack jupyterlab-plotly@4.14.3
npm notice 
npm notice 📦  jupyterlab-plotly@4.14.3
npm notice === Tarball Contents === 
npm notice 545B  style/index.css                      
npm notice 6.3kB dist/javascript-renderer-extension.js
npm notice 1.0kB package.json                         
npm notice 156B  README.md                            
npm notice 1.0kB style/plotly.svg                     
npm notice === Tarball Details === 
npm notice name:          jupyterlab-plotly                       
npm notice version:       4.14.3                                  
npm notice filename:      jupyterlab-plotly-4.14.3.tgz            
npm notice package size:  3.1 kB                                  
npm notice unpacked size: 9.1 kB                                  
npm notice shasum:        bb424a50226c2ce1b816f061a8123f0f42418fc0
npm notice integrity:     sha512-6ZdmIQ5fDiBTY[...]nASwRNCf1U1Cg==
npm notice total files:   5                                       
npm notice 
jupyterlab-plotly-4.14.3.tgz

Node v10.19.0

Yarn configuration loaded.
Building jupyterlab assets (build:prod:minimize)
> node /root/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js install --non-interactive
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
success Already up-to-date.
Done in 1.27s.

> node /root/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js yarn-deduplicate -s fewer --fail
yarn run v1.21.1
$ /root/miniconda3/share/jupyter/lab/staging/node_modules/.bin/yarn-deduplicate -s fewer --fail
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

> node /root/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js
yarn install v1.21.1
[1/5] Validating package.json...
[2/5] Resolving packages...
[3/5] Fetching packages...
info fsevents@2.1.3: The platform "linux" is incompatible with this module.
info "fsevents@2.1.3" is an optional dependency and failed compatibility check. Excluding it from installation.
info fsevents@1.2.13: The platform "linux" is incompatible with this module.
info "fsevents@1.2.13" is an optional dependency and failed compatibility check. Excluding it from installation.
[4/5] Linking dependencies...
warning " > @lumino/coreutils@1.5.3" has unmet peer dependency "crypto@1.0.1".
[5/5] Building fresh packages...
Done in 6.94s.

> node /root/miniconda3/lib/python3.8/site-packages/jupyterlab/staging/yarn.js run build:prod:minimize
yarn run v1.21.1
$ ensure-max-old-space webpack --config webpack.prod.minimize.config.js
child_process.js:650
    throw err;
    ^

Error: Command failed: /root/miniconda3/share/jupyter/lab/staging/node_modules/.bin/webpack --config webpack.prod.minimize.config.js
    at checkExecSyncError (child_process.js:629:11)
    at Object.execFileSync (child_process.js:647:13)
    at Object.<anonymous> (/root/miniconda3/share/jupyter/lab/staging/node_modules/@jupyterlab/buildutils/lib/ensure-max-old-space.js:38:17)
    at Module._compile (internal/modules/cjs/loader.js:778:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
    at Module.load (internal/modules/cjs/loader.js:653:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
    at Function.Module._load (internal/modules/cjs/loader.js:585:3)
    at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
    at startup (internal/bootstrap/node.js:283:19)
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

JupyterLab failed to build
Traceback (most recent call last):

  File "/root/miniconda3/lib/python3.8/site-packages/jupyterlab/debuglog.py", line 47, in debug_logging
    yield

  File "/root/miniconda3/lib/python3.8/site-packages/jupyterlab/labextensions.py", line 104, in start
    build(clean_staging=self.should_clean,

  File "/root/miniconda3/lib/python3.8/site-packages/jupyterlab/commands.py", line 459, in build
    return handler.build(name=name, version=version, static_url=static_url,

  File "/root/miniconda3/lib/python3.8/site-packages/jupyterlab/commands.py", line 661, in build
    raise RuntimeError(msg)

RuntimeError: JupyterLab failed to build

Exiting application: jupyter

我正在运行 Python 3.8.5 和 JupyterLab 6.2.0。

0 个答案:

没有答案