ipywidgets don't work on Jupyterlab
See original GitHub issueI have tried any solution that I can find but ipywidgets still don’t work on Jupyterlab, though it works perfectly on jupyternotebook. Really thanks if any one can help.
jupyter labextension list:
JupyterLab v0.35.4 Known labextensions: app dir: /anaconda/envs/py36/share/jupyter/lab @jupyter-widgets/jupyterlab-manager v0.38.1 enabled OK @jupyterlab/fasta-extension v0.18.1 enabled OK @jupyterlab/github v0.10.0 disabled OK @jupyterlab/latex v0.6.1 enabled OK @jupyterlab/toc v0.6.0 enabled OK @jupyterlab/vega2-extension v0.18.1 enabled OK @jupyterlab/vega3-extension v0.18.1 enabled OK jupyter-matplotlib v0.3.0 enabled OK jupyterlab-toc v0.2.1 enabled X jupyterlab_voyager v0.2.0 enabled X
The full result after running jupyter labextension install @jupyter-widgets/jupyterlab-manager:
`Node v10.8.0 //anaconda/envs/py36/bin/npm pack @jupyter-widgets/jupyterlab-manager npm notice npm notice 📦 @jupyter-widgets/jupyterlab-manager@0.38.1 npm notice === Tarball Contents === npm notice 2.0kB package.json npm notice 1.5kB LICENSE npm notice 2.0kB README.md npm notice 131B lib/index.d.ts npm notice 410B lib/index.js npm notice 2.5kB lib/manager.d.ts npm notice 6.2kB lib/manager.js npm notice 1.9kB lib/output.d.ts npm notice 6.0kB lib/output.js npm notice 1.1kB lib/plugin.d.ts npm notice 3.6kB lib/plugin.js npm notice 829B lib/renderer.d.ts npm notice 3.0kB lib/renderer.js npm notice 216B lib/semvercache.d.ts npm notice 972B lib/semvercache.js npm notice === Tarball Details === npm notice name: @jupyter-widgets/jupyterlab-manager npm notice version: 0.38.1 npm notice filename: jupyter-widgets-jupyterlab-manager-0.38.1.tgz npm notice package size: 8.5 kB npm notice unpacked size: 32.3 kB npm notice shasum: 1b1e17c929065bd2a93057b2378562c10c3db6c0 npm notice integrity: sha512-JutIwjs2jq6qW[…]Phr69YQ+qQZ/Q== npm notice total files: 15 npm notice jupyter-widgets-jupyterlab-manager-0.38.1.tgz Node v10.8.0
The extension “jupyterlab-toc” is outdated.
The extension “jupyterlab_voyager” is outdated.
node //anaconda/envs/py36/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install yarn install v1.9.4 info No lockfile found. [1/5] 🔍 Validating package.json… [2/5] 🔍 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. [3/5] 🚚 Fetching packages… [-----------------------------------------------------------------------------------------------------------] 0/1024(node:69901) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [4/5] 🔗 Linking dependencies… warning “@jupyterlab/vdom-extension > @nteract/transform-vdom@1.1.1” has incorrect peer dependency “react@^15.6.1”. [5/5] 📃 Building fresh packages… [1/4] ⠈ fsevents [2/4] ⠈ jupyter-matplotlib [3/4] ⠈ canvas warning Error running install script for optional dependency: "/anaconda/envs/py36/share/jupyter/lab/staging/node_modules/canvas: Command failed. Exit code: 1 Command: node-gyp rebuild Arguments: Directory: /anaconda/envs/py36/share/jupyter/lab/staging/node_modules/canvas Output: gyp info it worked if it ends with ok gyp info using node-gyp@3.7.0 gyp info using node@10.8.0 | darwin | x64 gyp ERR! configure error gyp ERR! stack Error: Python executable "/anaconda/envs/py36/bin/python" is v3.6.5, which is not supported by gyp. gyp ERR! stack You can pass the --python switch to point to Python >= v2.5.0 & < 3.0.0. gyp ERR! stack at PythonFinder.failPythonVersion (/anaconda/envs/py36/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:501:19) gyp ERR! stack at PythonFinder.<anonymous> (/anaconda/envs/py36/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:483:14) gyp ERR! stack at ChildProcess.exithandler (child_process.js:279:7) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at maybeClose (internal/child_process.js:962:16) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:249:5) gyp ERR! System Darwin 18.2.0 gyp ERR! command "/anaconda/envs/py36/bin/node" "/anaconda/envs/py36/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /anaconda/envs/py36/share/jupyter/lab/staging/node_modules/canvas gyp ERR! node -v v10.8.0 success Saved lockfile. ✨ Done in 73.73s. node //anaconda/envs/py36/lib/python3.6/site-packages/jupyterlab/staging/yarn.js run build yarn run v1.9.4 $ webpack (node:69925) DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead Hash: 151b5c7509eb8fccf62a Version: webpack 4.12.2 Time: 14966ms Built at: 12/09/2018 9:00:22 PM Asset Size Chunks Chunk Names vendors~vega2.83f892a0063b427bc047.js 1.29 MiB vendors~vega2 [emitted] vendors~vega2 21c506c264866aa2afec.worker.js 1.45 MiB [emitted] 674f50d287a8c48dc19ba404d20fe713.eot 162 KiB [emitted] af7ae505a9eed503f8b8e6982036873e.woff2 75.4 KiB [emitted] bf677598a57b9539055834af51cf6062.png 290 bytes [emitted] faa74e8c61fc64d5edb11613c7eead2c.gif 2.49 KiB [emitted] 912ec66d7572ff821749319396470bde.svg 434 KiB [emitted] fee66e712a8a08eef5805a46892932ad.woff 95.7 KiB [emitted] b06871f281fee6b241d60582ae9369b9.ttf 162 KiB [emitted] b2ffb3a32c2e07826c887815599de6f3.png 34.6 KiB [emitted] main.7100ba306dfa4e8abe49.js 62 KiB main [emitted] main 0.cc98107762fcc28532b3.js 4.5 KiB 0 [emitted] vega2.024da439f95a6cb58f00.js 1.17 KiB vega2 [emitted] vega2 vendors~main.5e8874aefc58996a5920.js 14 MiB vendors~main [emitted] vendors~main 21c506c264866aa2afec.worker.js.map 1.73 MiB [emitted] 1.055322dcf6c2bb19185f.js 888 KiB 1 [emitted] vendors~@jupyter-widgets/controls.741a7524652a40694e8a.js 266 KiB vendors~@jupyter-widgets/controls [emitted] vendors~@jupyter-widgets/controls vendors~vega.0fea7782387b6a25271d.js 44.7 KiB vendors~vega [emitted] vendors~vega 2.9f854dc15a7a8d2ec003.js 1.44 MiB 2 [emitted] main.7100ba306dfa4e8abe49.js.map 71.5 KiB main [emitted] main 0.cc98107762fcc28532b3.js.map 5.73 KiB 0 [emitted] vega2.024da439f95a6cb58f00.js.map 459 bytes vega2 [emitted] vega2 vendors~main.5e8874aefc58996a5920.js.map 15.1 MiB vendors~main [emitted] vendors~main vendors~vega2.83f892a0063b427bc047.js.map 1.51 MiB vendors~vega2 [emitted] vendors~vega2 1.055322dcf6c2bb19185f.js.map 1.04 MiB 1 [emitted] vendors~@jupyter-widgets/controls.741a7524652a40694e8a.js.map 303 KiB vendors~@jupyter-widgets/controls [emitted] vendors~@jupyter-widgets/controls vendors~vega.0fea7782387b6a25271d.js.map 39.6 KiB vendors~vega [emitted] vendors~vega 2.9f854dc15a7a8d2ec003.js.map 1.72 MiB 2 [emitted] index.html 1.54 KiB [emitted] Entrypoint main = vendors~main.5e8874aefc58996a5920.js vendors~main.5e8874aefc58996a5920.js.map main.7100ba306dfa4e8abe49.js main.7100ba306dfa4e8abe49.js.map [33fp] ./node_modules/msa/lib/g sync 160 bytes {main} [optional] [built] [0] multi whatwg-fetch ./build/index.out.js 40 bytes {main} [built] [1] vertx (ignored) 15 bytes {main} [optional] [built] [4] buffer (ignored) 15 bytes {main} [optional] [built] [10] node-fetch (ignored) 15 bytes {main} [built] [11] fs (ignored) 15 bytes {main} [built] [17] fs (ignored) 15 bytes {main} [built] [18] http (ignored) 15 bytes {main} [built] [ANye] ./build/index.out.js 41.3 KiB {main} [built] [RnhZ] ./node_modules/moment/locale sync ^./.$ 2.88 KiB {main} [optional] [built] [19] https (ignored) 15 bytes {main} [built] [YuTi] (webpack)/buildin/module.js 497 bytes {vendors~main} [built] [eTbV] ./node_modules/codemirror/mode sync ^./..js$ 2.78 KiB {0} [built] [leYS] ./node_modules/msa/lib/utils sync 160 bytes {main} [built] [yLpj] (webpack)/buildin/global.js 489 bytes {vendors~main} [built] + 2986 hidden modules
WARNING in ./node_modules/msa/lib/utils/tree.js 117:11-23 Critical dependency: the request of a dependency is an expression @ ./node_modules/msa/lib/msa.js @ ./node_modules/msa/lib/index.js @ ./node_modules/@jupyterlab/fasta-extension/lib/index.js @ ./build/index.out.js @ multi whatwg-fetch ./build/index.out.js
WARNING in ./node_modules/msa/lib/g/package.js 20:14-26 Critical dependency: the request of a dependency is an expression @ ./node_modules/msa/lib/msa.js @ ./node_modules/msa/lib/index.js @ ./node_modules/@jupyterlab/fasta-extension/lib/index.js @ ./build/index.out.js @ multi whatwg-fetch ./build/index.out.js
WARNING in d3-array Multiple versions of d3-array found: 1.2.4 ./~/d3-scale/~/d3-array from ./~/d3-scale/~/d3-array/src/index.js 2.0.2 ./~/d3-array from ./~/d3-array/src/index.js
WARNING in d3-dsv Multiple versions of d3-dsv found: 0.1.14 ./~/d3-dsv from ./~/datalib/src/import/formats/dsv.js 1.0.10 ./~/vega-loader/~/d3-dsv from ./~/vega-loader/~/d3-dsv/src/index.js
WARNING in d3-format Multiple versions of d3-format found: 0.4.2 ./~/datalib/~/d3-format from ./~/datalib/src/format.js 1.3.2 ./~/d3-format from ./~/d3-format/src/index.js
WARNING in d3-time Multiple versions of d3-time found: 0.1.1 ./~/d3-time from ./~/datalib/src/format.js 1.0.10 ./~/vega-scale/~/d3-time from ./~/vega-scale/~/d3-time/src/index.js
WARNING in d3-time-format Multiple versions of d3-time-format found: 0.2.1 ./~/datalib/~/d3-time-format from ./~/datalib/src/format.js 2.1.3 ./~/d3-time-format from ./~/d3-time-format/src/index.js
WARNING in datalib Multiple versions of datalib found: 1.7.3 ./~/vega-embed-v2/~/datalib from ./~/vega-embed-v2/~/vega-lite/src/util.js 1.9.2 ./~/datalib from ./~/datalib/src/aggregate/aggregator.js
WARNING in jquery Multiple versions of jquery found: 2.2.4 ./~/jupyter-matplotlib/~/jquery from ./~/jupyter-matplotlib/src/mpl_widget.js 3.3.1 ./~/jquery from ./~/jquery-ui/ui/widget.js
WARNING in vega-dataflow Multiple versions of vega-dataflow found: 1.4.3 ./~/vega/~/vega-dataflow from ./~/vega/~/vega-dataflow/src/index.js 4.1.0 ./~/vega-dataflow from ./~/vega-dataflow/index.js
WARNING in vega-embed Multiple versions of vega-embed found: 2.2.0 ./~/vega-embed-v2/~/vega-embed from ./~/vega-embed-v2/index.js 3.15.0 ./~/vega-embed from ./~/@jupyterlab/vega3-extension/lib/index.js 3.18.2 ./~/@jupyterlab/vega4-extension/~/vega-embed/build from ./~/@jupyterlab/vega4-extension/~/vega-embed/build/src/embed.js
WARNING in vega-event-selector Multiple versions of vega-event-selector found: 1.1.0 ./~/vega/~/vega-event-selector from ./~/vega/src/parse/index.js 2.0.0 ./~/vega-event-selector from ./~/vega-parser/src/parsers/update.js
WARNING in vega-expression Multiple versions of vega-expression found: 1.2.1 ./~/vega/~/vega-expression from ./~/vega/~/vega-expression/src/index.js 2.4.0 ./~/vega-expression from ./~/vega-expression/index.js
WARNING in vega-lite Multiple versions of vega-lite found: 1.3.1 ./~/vega-embed-v2/~/vega-lite from ./~/vega-embed-v2/~/vega-lite/src/config.js 2.5.1 ./~/vega-lite/build/src from ./~/vega-lite/build/src/compile/selection/selection.js 2.6.0 ./~/vega-lite/build from ./~/vega-lite/build/src/index.js
WARNING in vega-scenegraph Multiple versions of vega-scenegraph found: 1.1.0 ./~/vega/~/vega-scenegraph from ./~/vega/~/vega-scenegraph/src/render/canvas/index.js 3.2.3 ./~/vega-scenegraph from ./~/vega-scenegraph/src/marks/index.js
WARNING in vega-tooltip Multiple versions of vega-tooltip found: 0.11.0 ./~/vega-tooltip from ./~/vega-tooltip/build/index.js 0.12.0 ./~/@jupyterlab/vega4-extension/~/vega-tooltip from ./~/@jupyterlab/vega4-extension/~/vega-tooltip/build/index.js
Check how you can resolve duplicate packages: https://github.com/darrenscerri/duplicate-package-checker-webpack-plugin#resolving-duplicate-packages-in-your-bundle
Child html-webpack-plugin for “index.html”: 1 asset Entrypoint undefined = index.html [KTNU] ./node_modules/html-loader!./templates/partial.html 567 bytes {0} [built] [YuTi] (webpack)/buildin/module.js 497 bytes {0} [built] [aS2v] ./node_modules/html-webpack-plugin/lib/loader.js!./templates/template.html 1.22 KiB {0} [built] [yLpj] (webpack)/buildin/global.js 489 bytes {0} [built] + 1 hidden module Child worker: Asset Size Chunks Chunk Names 21c506c264866aa2afec.worker.js 1.45 MiB main [emitted] main 21c506c264866aa2afec.worker.js.map 1.73 MiB main [emitted] main Entrypoint main = 21c506c264866aa2afec.worker.js 21c506c264866aa2afec.worker.js.map [yLpj] (webpack)/buildin/global.js 489 bytes {main} [built] + 2 hidden modules ✨ Done in 16.98s.`
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (6 by maintainers)
Top GitHub Comments
@Alalalalaki Thanks for reporting back! I would then conclude that there is some weird config/build state for lab in the default env. Your best bet to clear out such a state is likely to be a full nuke of the lab installation:
jupyter --paths
.Great, thanks for following up here.