Skip to content

Commit 9937824

Browse files
committed
Update install versions
1 parent 99fe578 commit 9937824

File tree

5 files changed

+33
-332
lines changed

5 files changed

+33
-332
lines changed

README.md

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -47,21 +47,6 @@ pip install -r requirements.txt
4747
ipython kernel install --name widgets-tutorial --display-name widgets-tutorial --sys-prefix
4848
```
4949

50-
## Install JupyterLab extensions
51-
52-
In order to install the JupyterLab extensions, you need `nodejs` to be installed. If you use `conda` it should have been already installed for you when you created your environment.
53-
54-
55-
If you do not use `conda`, see [https://nodejs.org/en/download/](https://nodejs.org/en/download/) or [https://nodejs.org/en/download/package-manager/](https://nodejs.org/en/download/package-manager/) for download and installation instructions.
56-
57-
58-
Now you can install the JupyterLab extensions:
59-
60-
```bash
61-
# This may take several minutes
62-
jupyter labextension install @jupyter-widgets/jupyterlab-manager @jupyter-widgets/jupyterlab-sidecar bqplot jupyter-threejs [email protected] ipysheet ipytree ipycanvas jupyter-matplotlib jupyter-vuetify ipyvolume
63-
```
64-
6550
## Check your installation
6651

6752
To check your installation, please download the script [install_check.py](https://raw.githubusercontent.com/jupyter-widgets/tutorial/master/install_check.py) and run it:

environment.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,26 +4,25 @@ channels:
44
dependencies:
55
- python=3.8
66
- pip
7-
- notebook
87
- numpy
98
- scikit-image
109
- scipy
1110
- pandas
1211
- requests
1312
- ipywidgets
1413
- bqplot
15-
- ipyleaflet=0.12.6
14+
- ipyleaflet
1615
- pythreejs
1716
- ipycanvas
18-
- ipyevents
19-
- ipysheet
2017
- ipytree
2118
- ipympl
22-
- pywwt
19+
- ipygany
20+
- ipydatagrid
21+
- ipycytoscape
22+
# - pywwt
2323
- sidecar
24-
- voila=0.1
24+
- voila
2525
- ipyvuetify
2626
- voila-vuetify
27-
- jupyterlab=2
28-
- ipyvolume=0.6.0a6
29-
- nodejs=13
27+
- jupyterlab=3
28+
- ipyvolume

install_check.py

Lines changed: 18 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import sys
2+
import logging
13
from subprocess import check_call, CalledProcessError
24

35

@@ -35,10 +37,8 @@
3537
success = all(import_result.values())
3638

3739
# List compatible versions for each package
38-
version_check_packages = {'ipywidgets': ['7.5'],
39-
'notebook': ['6'],
40-
'jupyterlab': ['2'],
41-
'ipyvolume': ['0.6.0-alpha.6'],
40+
version_check_packages = {'ipywidgets': ['7.6'],
41+
'jupyterlab': ['3'],
4242
}
4343

4444
if success:
@@ -90,14 +90,6 @@ def version_checker(package_name, version, nbextension=None):
9090
ipywidgets_version = ipywidgets.__version__
9191
version_checker('ipywidgets', ipywidgets_version)
9292

93-
try:
94-
import notebook
95-
except ImportError:
96-
pass
97-
else:
98-
notebook_version = notebook.__version__
99-
version_checker('notebook', notebook_version)
100-
10193
try:
10294
import jupyterlab
10395
except ImportError:
@@ -106,14 +98,6 @@ def version_checker(package_name, version, nbextension=None):
10698
jupyterlab_version = jupyterlab.__version__
10799
version_checker('jupyterlab', jupyterlab_version)
108100

109-
try:
110-
import ipyvolume
111-
except ImportError:
112-
pass
113-
else:
114-
ipyvolume_version = ipyvolume.__version__
115-
version_checker('ipyvolume', ipyvolume_version)
116-
117101
# Check that the appropriate kernel has been created
118102

119103
required_kernel = 'widgets-tutorial'
@@ -148,21 +132,31 @@ def version_checker(package_name, version, nbextension=None):
148132
'jupyter-vuetify',
149133
]
150134

135+
151136
try:
152-
from jupyterlab.commands import check_extension
137+
from jupyterlab.commands import check_extension, AppOptions
138+
from jupyterlab_server.config import get_federated_extensions
153139
except ImportError:
154140
print(FIX_PREFIX, 'Please install jupyterlab before checking extensions.')
155141
else:
156142
missing_extensions = []
157143

144+
# Fetch federated extensions
145+
federated_extensions = get_federated_extensions([sys.base_prefix + '/share/jupyter/labextensions']).keys()
146+
147+
# JupyterLab be quiet
148+
logger = logging.Logger('quiet')
149+
logger.setLevel(logging.CRITICAL)
150+
app_options = AppOptions(logger=logger)
151+
158152
for extension in lab_extensions:
159-
if not check_extension(extension):
153+
if not check_extension(extension, app_options=app_options) and extension not in federated_extensions:
160154
missing_extensions.append(extension)
161155

162156
if missing_extensions:
163157
print(FIX_PREFIX, 'These lab extensions are missing: ',
164158
', '.join(missing_extensions))
165-
print(FIX_PREFIX,' Run this to install them: jupyter labextension install ',
166-
' '.join(missing_extensions))
159+
print(FIX_PREFIX,' Please try to install the following packages with conda or pip: ',
160+
', '.join(missing_extensions))
167161
else:
168162
print('\tAll extensions are installed!')

0 commit comments

Comments
 (0)