Skip to content

Commit fc9dc9f

Browse files
feat: Documentation update for newer versions Jupyter notebook
1 parent 81ec72a commit fc9dc9f

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

README.md

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,42 @@ See the [Sending Local Data to Spark notebook](examples/Send%20local%20data%20to
4848

4949
## Installation
5050

51+
### Jupyter Notebook 7.x / JupyterLab 3.x
52+
5153
1. Install the library
5254

5355
pip install sparkmagic
5456

5557
2. Make sure that ipywidgets is properly installed by running
5658

57-
jupyter nbextension enable --py --sys-prefix widgetsnbextension
59+
pip install ipywidgets
60+
61+
3. (Optional) Install the wrapper kernels. Do `pip show sparkmagic` and it will show the path where `sparkmagic` is installed at. `cd` to that location and do:
62+
jupyter-kernelspec install sparkmagic/kernels/sparkkernel
63+
jupyter-kernelspec install sparkmagic/kernels/pysparkkernel
64+
jupyter-kernelspec install sparkmagic/kernels/sparkrkernel
65+
66+
4. (Optional) Modify the configuration file at ~/.sparkmagic/config.json. Look at the [example_config.json](sparkmagic/example_config.json)
67+
68+
5. (Optional) Enable the server extension so that clusters can be programatically changed:
69+
70+
jupyter server extension enable --py sparkmagic
71+
72+
### Jupyter Notebook 5.2 or earlier / JupyterLab 1 or 2
73+
74+
1. Install the library
75+
76+
pip install sparkmagic
77+
78+
2. Make sure that ipywidgets is properly installed by running
5879

59-
3. If you're using JupyterLab, you'll need to run another command:
80+
jupyter nbextension enable --py --sys-prefix widgetsnbextension
81+
82+
3. If you're using JupyterLab 1 or 2, you'll need to run another command:
6083

6184
jupyter labextension install "@jupyter-widgets/jupyterlab-manager"
6285

6386
4. (Optional) Install the wrapper kernels. Do `pip show sparkmagic` and it will show the path where `sparkmagic` is installed at. `cd` to that location and do:
64-
6587
jupyter-kernelspec install sparkmagic/kernels/sparkkernel
6688
jupyter-kernelspec install sparkmagic/kernels/pysparkkernel
6789
jupyter-kernelspec install sparkmagic/kernels/sparkrkernel

0 commit comments

Comments
 (0)