Skip to content

Commit

Permalink
Improve README
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Oct 18, 2019
1 parent 0e56bac commit 00f7dde
Showing 1 changed file with 29 additions and 15 deletions.
44 changes: 29 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,34 +41,48 @@ A Jupyter / Leaflet bridge enabling interactive maps in the Jupyter notebook.
Using conda:

```
$ conda install -c conda-forge ipyleaflet
conda install -c conda-forge ipyleaflet
```

Using pip:

```
$ pip install ipyleaflet
$ jupyter nbextension enable --py --sys-prefix ipyleaflet # can be skipped for
notebook 5.3 and above
pip install ipyleaflet
```

If you have JupyterLab, you will also need to install the JupyterLab extension:
If you are using the classic Jupyter Notebook < 5.3 you need to run this extra command:

```
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet
jupyter nbextension enable --py --sys-prefix ipyleaflet
```

If you are using JupyterLab, you will need to install the JupyterLab extension:

```
jupyter labextension install @jupyter-widgets/jupyterlab-manager jupyter-leaflet
```

## Installation from sources

For a development installation (requires npm):
For a development installation (requires npm, you can install it with `conda install -c conda-forge nodejs`):

```
git clone https://github.com/jupyter-widgets/ipyleaflet.git
cd ipyleaflet
pip install -e .
```

If you are using the classic Jupyter Notebook you need to install the nbextension:

```
jupyter nbextension install --py --symlink --sys-prefix ipyleaflet
jupyter nbextension enable --py --sys-prefix ipyleaflet
```

If you are using JupyterLab, you need to install the labextension for ipywidgets and ipyleaflet:

```
$ git clone https://github.com/jupyter-widgets/ipyleaflet.git
$ cd ipyleaflet
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix ipyleaflet
$ jupyter nbextension enable --py --sys-prefix ipyleaflet
$ jupyter labextension install @jupyter-widgets/jupyterlab-manager js # If you are developing on JupyterLab
jupyter labextension install @jupyter-widgets/jupyterlab-manager js
```

Note for developers:
Expand All @@ -79,13 +93,13 @@ Note for developers:
For automatically building the JavaScript code every time there is a change, run the following command from the ``ipyleaflet/js/`` directory:

```
$ npm run watch
npm run watch
```

If you are on JupyterLab you also need to run the following in a separate terminal:

```
$ jupyter lab --watch
jupyter lab --watch
```

Every time a JavaScript build has terminated you need to refresh the Notebook page in order to load the JavaScript code again.
Expand Down

0 comments on commit 00f7dde

Please sign in to comment.