Ipywidgets: jupyterlab-manager-0.35 installation hungs with jupyterlab 0.32.1

Created on 28 Apr 2018  ·  27Comments  ·  Source: jupyter-widgets/ipywidgets

I have:
OSX 10.13.4
python 3.6.5
jupyterlab 0.32.1

To start form a clean sheet I do

jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager
jupyter lab clean
jupyter lab build

Then I try to install again jupyterlab-manager:

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager
> /usr/local/bin/npm pack @jupyter-widgets/jupyterlab-manager
jupyter-widgets-jupyterlab-manager-0.35.0.tgz
> node /Users/e/anaconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:11382) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] 🔍  Resolving packages...
⢀ @jupyter-widgets/jupyterlab-manager@file:../extensions/jupyter-widgets-jupyterlab-manager-0.35.0.tgz

At this stage the installation keeps on this line for minutes. Usually after > 5 minutes I kill the install.

resolved-locked

Most helpful comment

Yet another way to get this working, but without installing a different node version (and without waiting for a JupyterLab build with jupyterlab/jupyterlab#4632). In my setup, I have everything in a virtualenv.

  1. Upgrade your system yarn to 1.7.0 or higher: npm install -g yarn It will probably do something like this:
bash-3.2$ npm install -g yarn
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
  1. Hang onto the complete path to yarn.js that npm reported. (It might be a different path on your system to what I've pasted above.)
  2. Find where the jupyterlab Python module is installed; in my virtualenv, it's in lib/python3.6/site-packages/jupyterlab/
  3. Inside the module, edit staging/.yarnrc, which will look like:
yarn-path "./yarn.js"

Change the value to the complete path to yarn.js that you grabbed in step 2.

  1. jupyter labextension install should now work!

All 27 comments

It works fine for me on macOS 10.13.4 (it doesn't pause on the resolving packages line):

conda create -y -n jlab0.32.1 -c conda-forge notebook jupyterlab ipywidgets
conda activate jlab0.32.1
jupyter labextension install @jupyter-widgets/jupyterlab-manager

Can you try a fresh install like that, creating a new environment?

Also, just checking - what does jupyter labextension list give?

I have the exact same problem, screen is showing exactly the same.

I am trying to install without conda,
jupyter labextension install @jupyter-widgets/jupyterlab-manager

Environment:

OS: Raspbian 4.14.34-v7+
nodejs 10.0.0
python 3.5.3
jupyter lab 0.32.1

Reproduced with on Mac OS and Arch linux (jupyterlab 0.32.1). Trying to update with:

jupyter labextension install @jupyter-widgets/jupyterlab-manager

hangs in endless loop on both platforms during build at:

⠐ @jupyter-widgets/jupyterlab-manager@file:../extensions/jupyter-widgets-jupyterlab-manager-0.35.0.tgz

Also jupyter lab clean followed by jupyter lab build does not fix this. Manually uninstalling all extensions, rebuild and then installing jupyterlab-manger also does not work.

When the endless loop during install is interrupted, lab-manager claims to be installed:

JupyterLab v0.32.1
Known labextensions:
   app dir: /usr/share/jupyter/lab
@jupyter-widgets/jupyterlab-manager
        @jupyter-widgets/jupyterlab-manager v0.35.0  enabled  OK

Build recommended, please run `jupyter lab build`:
    @jupyter-widgets/jupyterlab-manager needs to be included in build

But a build again leads to the endless loop during install.

Only way out is:

jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager

Trying to figure out what is in common here, and how I could reproduce the issue:

  • It seems that no one seeing this problem is using conda? Is everyone here using pip?
  • Is everyone here upgrading jupyterlab, rather than installing it fresh?

What happens if you do

jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager
jupyter lab clean
jupyter labextension install @jupyter-widgets/jupyterlab-manager --debug

Any more informative error messages?

What happens if you do

jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager
jupyter lab clean
jupyter labextension install @jupyter-widgets/jupyterlab-manager   --no-build
jupyter lab build --dev --debug

Yes, jupyterlab is updated via PIP for linux and macOS, no conda.

Unfortunately, no more useful information with both variants:

 $ sudo jupyter lab clean
 $ sudo jupyter labextension install @jupyter-widgets/jupyterlab-manager   --no-build
> /usr/bin/npm pack @jupyter-widgets/jupyterlab-manager
npm notice 
npm notice 🟟  @jupyter-widgets/[email protected]
npm notice === Tarball Contents === 
npm notice 0     package             
npm notice 1.6kB README.md           
npm notice 0     lib                 
npm notice 1.9kB package.json        
npm notice 131B  lib/index.d.ts      
npm notice 252B  lib/index.js        
npm notice 2.4kB lib/manager.d.ts    
npm notice 9.8kB lib/manager.js      
npm notice 1.6kB lib/output.d.ts     
npm notice 6.7kB lib/output.js       
npm notice 1.1kB lib/plugin.d.ts     
npm notice 3.5kB lib/plugin.js       
npm notice 829B  lib/renderer.d.ts   
npm notice 6.4kB lib/renderer.js     
npm notice 216B  lib/semvercache.d.ts
npm notice 1.1kB lib/semvercache.js  
npm notice === Tarball Details === 
npm notice name:          @jupyter-widgets/jupyterlab-manager          
npm notice version:       0.35.0                                       
npm notice filename:      jupyter-widgets-jupyterlab-manager-0.35.0.tgz
npm notice package size:  8.8 kB                                       
npm notice unpacked size: 37.6 kB                                      
npm notice shasum:        7dd205e5210b5f8819892b3a7f7424c729066fd6     
npm notice integrity:     sha512-4bsborpYgbmXf[...]9dmK8Fyo4SAxg==     
npm notice total files:   16                                           
npm notice 
jupyter-widgets-jupyterlab-manager-0.35.0.tgz
 $ sudo jupyter lab build --dev --debug
[LabBuildApp] Searching ['/usr/share/jupyter', '/root/.jupyter', '/usr/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[LabBuildApp] Looking for jupyter_config in /etc/jupyter
[LabBuildApp] Looking for jupyter_config in /usr/local/etc/jupyter
[LabBuildApp] Looking for jupyter_config in /usr/etc/jupyter
[LabBuildApp] Looking for jupyter_config in /root/.jupyter
[LabBuildApp] Looking for jupyter_config in /usr/share/jupyter
[LabBuildApp] Looking for JupyterLab_config in /etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /usr/local/etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /usr/etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /root/.jupyter
[LabBuildApp] Looking for JupyterLab_config in /usr/share/jupyter
[LabBuildApp] > node /usr/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:10730) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] Resolving packages...
⠂ @jupyter-widgets/jupyterlab-manager@file:../extensions/jupyter-widgets-jupyter

...hangs here

What is in /usr/share/jupyter/lab/extensions/? Is it just the single jupyter-widgets-jupyterlab-manager-0.35.0.tgz file with shasum 7dd205e5210b5f8819892b3a7f7424c729066fd6?

Seems ok:

$ pwd
/usr/share/jupyter/lab/extensions
$ ls 
jupyter-widgets-jupyterlab-manager-0.35.0.tgz
$ shasum jupyter-widgets-jupyterlab-manager-0.35.0.tgz 
7dd205e5210b5f8819892b3a7f7424c729066fd6  jupyter-widgets-jupyterlab-manager-0.35.0.tgz

Seems to be a node 10 issue. I'm on macos too and I use homebrew to manage node. I think last week it upgraded me to node 10. I tried updating my jupyterlab today and it was having trouble with these packages. I downgraded to node 8 by

brew install node@8

and everything seems to be working fine again.

FYI: Looks like it's yarn + nodejs 10.0, https://github.com/yarnpkg/yarn/issues/5761

I'm using conda and also have this issue.

Any updates on this issue?

I was having this issue install any lab extension. Finally got it working:

brew install node@8
export PATH="/usr/local/opt/node@8/bin:$PATH"
jupyter labextension install @ijmbarr/jupyterlab_spellchecker

(or whatever lab extension you want). Without exporting the path, you will still be using node@10 if you have already installed it.

Any plans to fix this? Having to pick out a specific version of node is not ideal...

@guillochon This is a yarn issue, a PR to resolve this by updating yarn is open on the jupyterab repo: https://github.com/jupyterlab/jupyterlab/pull/4632

Yup, same issue. Ubuntu, using pip & pipenv. My fix was using nvm to install Node 9:

https://github.com/creationix/nvm

curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
nvm install 9
nvm use 9
jupyter labextension install @jupyter-widgets/jupyterlab-manager

Had same issue under MacOS/Conda. Reverting to node v8 using @sean-parent's post (above) worked for me:

brew install node@8
export PATH="/usr/local/opt/node@8/bin:$PATH"
jupyter labextension install @ijmbarr/jupyterlab_spellchecker

Yet another way to get this working, but without installing a different node version (and without waiting for a JupyterLab build with jupyterlab/jupyterlab#4632). In my setup, I have everything in a virtualenv.

  1. Upgrade your system yarn to 1.7.0 or higher: npm install -g yarn It will probably do something like this:
bash-3.2$ npm install -g yarn
/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js
  1. Hang onto the complete path to yarn.js that npm reported. (It might be a different path on your system to what I've pasted above.)
  2. Find where the jupyterlab Python module is installed; in my virtualenv, it's in lib/python3.6/site-packages/jupyterlab/
  3. Inside the module, edit staging/.yarnrc, which will look like:
yarn-path "./yarn.js"

Change the value to the complete path to yarn.js that you grabbed in step 2.

  1. jupyter labextension install should now work!

Yet another way

For me, this was the only way to get it working. Thanks @yozlet!

FYI, we've upgraded yarn in the next release of jlab.

I got the same HANGING error in jupyter lab:

Date: Jun 24, 2018
Platform: MacOS High Sierra 10.13.5

$ which python
python is /Users/poudel/miniconda3/bin/python

Installed using:

pip install jupyterlab

Commands Used

jupyter labextension uninstall @jupyter-widgets/jupyterlab-manager
jupyter lab clean
jupyter labextension install @jupyter-widgets/jupyterlab-manager   --no-build
jupyter lab build --dev --debug

Error:

$ jupyter lab build --dev --debug
[LabBuildApp] Searching ['/Users/poudel/miniconda3/lib/python3.6/site-packages', '/Users/poudel/.jupyter', '/Users/poudel/miniconda3/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[LabBuildApp] Looking for jupyter_config in /etc/jupyter
[LabBuildApp] Looking for jupyter_config in /usr/local/etc/jupyter
[LabBuildApp] Looking for jupyter_config in /Users/poudel/miniconda3/etc/jupyter
[LabBuildApp] Looking for jupyter_config in /Users/poudel/.jupyter
[LabBuildApp] Looking for jupyter_config in /Users/poudel/miniconda3/lib/python3.6/site-packages
[LabBuildApp] Looking for JupyterLab_config in /etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /usr/local/etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /Users/poudel/miniconda3/etc/jupyter
[LabBuildApp] Looking for JupyterLab_config in /Users/poudel/.jupyter
[LabBuildApp] Looking for JupyterLab_config in /Users/poudel/miniconda3/lib/python3.6/site-packages
[LabBuildApp] > node /Users/poudel/miniconda3/lib/python3.6/site-packages/jupyterlab/staging/yarn.js install
yarn install v1.5.1
(node:59381) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
info No lockfile found.
[1/4] 🔍  Resolving packages...
⠁ @jupyter-widgets/jupyterlab-manager@file:../extensions/jupyter-widgets-jupyterlab-manager-0.35.0.tgz

Problem
The last line keeps running forever!

@yozlet thanks for the fix. It is now working as expected.

For homebrew user's my yarn.js path was /usr/local/Cellar/yarn/1.7.0/libexec/bin/yarn.js

Thanks @yozlet!

Somehow just updating yarn.rc didn't do it for me. I ended up setting a symlink to yarn's cli.js and it finally worked. Assuming yarn is globally installed in:

/usr/local/bin/yarn -> /usr/local/lib/node_modules/yarn/bin/yarn.js
/usr/local/bin/yarnpkg -> /usr/local/lib/node_modules/yarn/bin/yarn.js

Then do the following changes:

cd /<ADJUST TO YOUR SYSTEM>/lib/python3.6/site-packages/jupyterlab/staging
mv ./yarn.js ./yarn.1.5.1.js
ln -s /usr/local/lib/node_modules/yarn/lib/cli.js ./yarn.js

(/usr/local/lib/node_modules/yarn/bin/yarn.js is internally calling ../lib/cli.js, which is why I am symlinking that into staging)

I am trying jlab v 0.33.0rc0 pip install jupyterlab==0.33.0rc0which now allows jlab extensions to be installed without issue. Worth trying if you are still having issues

Jupyter widgets does not work with 0.33.0rc yet.

Conda environment, 18.04 server, yarn trick above worked for me. Seems upgrading yarn in core is going to be the path forward (rather than rolling back node).

Yarn has been upgraded in JupyterLab (0.35, and I think 0.34 as well a month or so ago), so things should work just fine with newer versions of node. I'll close this as resolved. Please comment here if there are still issues with current JupyterLab.

Was this page helpful?
0 / 5 - 0 ratings