"Astronomy Picture of the Day" tutorial problem. Version mismatch?

I had a few months break, not working with jupyterlab. Now, jupyterlab seems not to work anymore for me. May be related to the jupyterlab 1.0 release candidate.

I follow the instructions at https://jupyterlab.readthedocs.io/en/stable/developer/extension_tutorial.html for the “Astronomy Picture of the Day” tutorial.
Those steps install JupyterLab version:
$ jupyter lab --version

When I run the step “jupyter labextension install . --no-build”, I get the errors below. How can I fix the problem? Do I have to let conda install the JupyterLab-1.0 release? How?

$ jupyter labextension install . --no-build
Node v10.8.0

> /home/ubuntu/miniconda3/envs/jupyterlab-ext/bin/npm pack /home/ubuntu/jupyterlab_apod

> jupyterlab_apod@0.1.0 prepare /home/ubuntu/jupyterlab_apod
> npm run clean && npm run build

> jupyterlab_apod@0.1.0 clean /home/ubuntu/jupyterlab_apod
> rimraf lib && rimraf tsconfig.tsbuildinfo

> jupyterlab_apod@0.1.0 build /home/ubuntu/jupyterlab_apod
> tsc

npm notice 
npm notice 📦  jupyterlab_apod@0.1.0
npm notice === Tarball Contents === 
npm notice 1.2kB package.json   
npm notice 461B  README.md      
npm notice 211B  lib/index.d.ts 
npm notice 3.7kB lib/index.js   
npm notice 103B  style/index.css
npm notice === Tarball Details === 
npm notice name:          jupyterlab_apod                         
npm notice version:       0.1.0                                   
npm notice filename:      jupyterlab_apod-0.1.0.tgz               
npm notice package size:  2.3 kB                                  
npm notice unpacked size: 5.7 kB                                  
npm notice shasum:        c481c2a8fd4a2051d27a31ff66a0dc8ef02f8d1c
npm notice integrity:     sha512-Vt/LCZJ9pYxKm[...]wa/LMmmlzjkKA==
npm notice total files:   5                                       
npm notice 

Errored, use --debug for full output:
"jupyterlab_apod@0.1.0" is not compatible with the current JupyterLab
Conflicting Dependencies:
JupyterLab              Extension        Package
>=0.19.1 <0.20.0        >=1.0.0-rc.0 <2.0.0@jupyterlab/application
>=0.19.1 <0.20.0        >=1.0.0-rc.0 <2.0.0@jupyterlab/apputils

Hi @ernstch,

Indeed, you need to upgrade JupyterLab to 1.0.

With pip:

pip install --upgrade jupyterlab

Or with conda:

conda update -c conda-forge jupyterlab

1 Like

Thank you, jtp,
conda update -c conda-forge jupyterlab solved my problem.

Imho, this command should be mentioned in the “astronomy picture or the day” tutorial. Or is there any setting that lets conda install the required jupyterlab version without running this extra command?

The command in this section creates a new conda environment from scratch, so it will pick up the latest version of JupyterLab automatically.

You can also pin dependencies, so for example the (simplified) command would become:

conda create -n jupyterlab-ext -c conda-forge jupyterlab=1.0

No, for me this command installs jupyterlab 0.35.6:
conda create -n jupyterlab-ext -c conda-forge --override-channels jupyterlab cookiecutter nodejs git
Also jsonschema is too old (2.6.0) and must be updated to 3.0.1 for jlpm to succeed.

No idea, why. But next time, I’ll specify jupyterlab=1.0 as you suggest. Thank you!

1 Like