Jupyter实验室构建在新的Azure数据科学VM(Linux)上失败

时间:2019-03-06 15:44:17

标签: azure jupyter-notebook azure-virtual-machine

正如标题所述,我创建了一个新的数据科学VM(Ubuntu),即使仅使用默认的jupyter hub扩展,运行jupyter build也失败。

在尝试此操作之前,我仅安装了两个其他软件包:Azure存储和pyarrow,用于读取Parquet文件。这些都不应该影响到jupyter。

该配置是Standard B4ms实例,但是我尝试了另一种配置,但它存在相同的问题。

环境是默认的py35 conda env。 Jupyter未安装在根环境中。
更新Jupyter或Jupyter Lab或ipython没有帮助。

这是完整的输出:

   (py35) user@VM:~$ jupyter lab build
[LabBuildApp] JupyterLab 0.34.12
[LabBuildApp] Building in /data/anaconda/envs/py35/share/jupyter/lab
[LabBuildApp] > node /data/anaconda/envs/py35/lib/python3.5/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.9.4
info No lockfile found.
[1/4] Resolving packages...
warning css-loader > cssnano > autoprefixer > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
warning css-loader > cssnano > postcss-merge-rules > caniuse-api > browserslist@1.7.7: Browserslist 2 could fail on reading Browserslist >3.0 config used in other tools.
[2/4] Fetching packages...
[------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------] 0/822(node:4101) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info fsevents@1.2.7: The platform "linux" is incompatible with this module.
info "fsevents@1.2.7" is an optional dependency and failed compatibility check. Excluding it from installation.
[3/4] Linking dependencies...
warning "@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1" has incorrect peer dependency "react@^15.6.1".
[4/4] Building fresh packages...
success Saved lockfile.
Done in 30.67s.
[LabBuildApp] > node /data/anaconda/envs/py35/lib/python3.5/site-packages/jupyterlab/staging/yarn.js run build
yarn run v1.9.4
$ webpack
ModuleNotFoundError: Module not found: Error: Can't resolve 'vega' in '/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/build/src/compile'
    at factory.create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/webpack/lib/Compilation.js:535:10)
    at factory (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:397:22)
    at resolver (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:130:21)
    at asyncLib.parallel (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:224:22)
    at /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/neo-async/async.js:2825:7
    at /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/neo-async/async.js:6886:13
    at normalResolver.resolve (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/webpack/lib/NormalModuleFactory.js:214:25)
    at doResolve (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:184:12)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at resolver.doResolve (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:12:1)
    at resolver.doResolve (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/DescriptionFilePlugin.js:42:38)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn41 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:381:1)
    at resolver.doResolve (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/ModuleKindPlugin.js:23:37)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at args (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/forEachBail.js:30:14)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at resolver.doResolve (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/UnsafeCachePlugin.js:37:5)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
    at _fn0 (eval at create (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/tapable/lib/HookCodeFactory.js:32:10), <anonymous>:15:1)
    at hook.callAsync (/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/enhanced-resolve/lib/Resolver.js:238:5)
resolve 'vega' in '/data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/build/src/compile'
  Parsed request is a module
  using description file: /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/build/package.json (relative path: ./src/compile)
    Field 'browser' doesn't contain a valid alias configuration
    resolve as module
      /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/build/src/compile/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/build/src/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/build/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/py35/share/jupyter/lab/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/py35/share/jupyter/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/py35/share/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/py35/node_modules doesn't exist or is not a directory
      /data/anaconda/envs/node_modules doesn't exist or is not a directory
      /data/anaconda/node_modules doesn't exist or is not a directory
      /data/node_modules doesn't exist or is not a directory
      /node_modules doesn't exist or is not a directory
      looking for modules in /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/node_modules
        using description file: /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
      looking for modules in /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules
        using description file: /data/anaconda/envs/py35/share/jupyter/lab/staging/package.json (relative path: ./node_modules)
          Field 'browser' doesn't contain a valid alias configuration
          using description file: /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/package.json (relative path: ./node_modules/vega)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
          using description file: /data/anaconda/envs/py35/share/jupyter/lab/staging/package.json (relative path: ./node_modules/vega)
            no extension
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/node_modules/vega doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega doesn't exist
            .wasm
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/node_modules/vega.wasm doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega.wasm doesn't exist
            .mjs
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/node_modules/vega.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega.mjs doesn't exist
            .js
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/node_modules/vega.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega.js doesn't exist
            .json
              Field 'browser' doesn't contain a valid alias configuration
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/node_modules/vega.json doesn't exist
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega.json doesn't exist
            as directory
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega-lite/node_modules/vega doesn't exist
            as directory
              /data/anaconda/envs/py35/share/jupyter/lab/staging/node_modules/vega doesn't exist
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

1 个答案:

答案 0 :(得分:0)

我有同样的问题。我通过将jupyterhub版本从0.34.9更新到3.5来解决了这个问题:

conda install jupyterlab=0.35 "ipywidgets>=7.2"

我通过以下链接遵循了说明:JupyterLab Support (Python 3.5+)

希望它能起作用!