|
1 | 1 | # Install and use locally
|
2 | 2 |
|
3 |
| -## Installing the Dyalog Jupyter kernel |
4 |
| -**Dyalog version 15.0 or later** and **Python version 3.X**, and the **jupyter** Python package must be installed in order to use the Dyalog Jupyter kernel. |
5 |
| - |
6 |
| -1. Go to [the python website](https://www.python.org/downloads/) to download and install Python on your system. Linux typically comes with Python already installed. |
7 |
| - |
8 |
| - If you need to manage multiple python versions, we recommend [pyenv](https://github.com/pyenv/pyenv). |
9 |
| - |
10 |
| -1. Install [Jupyter](https://jupyter.org/) from a command line or PowerShell terminal. |
11 |
| - |
12 |
| - `pip install jupyter` |
13 |
| - |
14 |
| -1. Download the Dyalog Jupyter kernel repository as a zip: Click [here](https://github.com/Dyalog/dyalog-jupyter-kernel/archive/master.zip) to do so. |
15 |
| -1. After downloading, extract the contents and open the *dyalog-jupyter-kernel-master* directory. |
16 |
| -1. Run the following (it will have little visual effect, if any): |
17 |
| - |
18 |
| - Windows: `install.bat` |
19 |
| - |
20 |
| - Linux and macOS: `install.sh` |
21 |
| - |
22 |
| -## Run Jupyter Notebook |
23 |
| -Use a command line or PowerShell terminal. |
24 |
| - |
25 |
| -Go to the directory which contains your notebooks: |
26 |
| - |
27 |
| -``` |
28 |
| -cd /path/to/my/notebooks |
29 |
| -``` |
30 |
| - |
31 |
| -Then start the Jupyter notebook system: |
32 |
| - |
33 |
| -``` |
34 |
| -jupyter notebook |
35 |
| -``` |
36 |
| - |
37 |
| -Jupyter Notebook uses a web interface. It has a drop-down button labeled *New▾* where you can choose to create a new Dyalog APL notebook. You can also navigate to and click on any existing notebook (a file with the `.ipynb` extension) to open it. |
| 3 | +**Dyalog version 15.0 or later** and **Python version 3.8+**, and the **jupyterlab** Python package must be installed in order to use the Dyalog Jupyter kernel. |
| 4 | + |
| 5 | +Installing, operating and maintaining a Python installation can be a bit of a chore, especially if you're not a Python developer. If you're coming to this wanting only to use Jupyter for Dyalog APL, here are some step by step instructions for how to set up the whole tool chain from scratch. |
| 6 | + |
| 7 | +If you're a Python developer, or if you're already using a "canned" Python distribution, like [conda](https://docs.conda.io/en/latest/), you probably know what you're doing and can skip this document. |
| 8 | + |
| 9 | +The below instructions show how to install Jupyter and the Dyalog kernel inside a Python "virtual environment". This means that you can keep your Jupyter work separate from any other Python work, current or future. This is usually a good idea when working with Python. |
| 10 | + |
| 11 | +1. Download and install the [Dyalog interpreter](https://www.dyalog.com/download-zone.htm). |
| 12 | +2. Download, and run the official [Python installer](https://www.python.org/downloads/). Ensure you select `Use admin privileges to install Python`, `Add python.exe to PATH`, and `Disable PATH limit`. |
| 13 | +3. Open a terminal (e.g. PowerShell if you're on Windows). Type the following steps into the terminal window. |
| 14 | +4. Create a virtual Python environment with a name of your choosing, e.g. |
| 15 | + ``` |
| 16 | + python -m venv jupy312 |
| 17 | + ``` |
| 18 | +5. Activate the virtual environment -- this is important: |
| 19 | + ``` |
| 20 | + jupy312\Scripts\activate # Windows |
| 21 | + . jupy312/bin/activate # linux, macOS. Note leading dot. |
| 22 | + ``` |
| 23 | + Your terminal prompt should change to have a `(jupy312)` prefix. |
| 24 | +6. [Optional, but recommended] Upgrade `pip` to the latest version: |
| 25 | + ``` |
| 26 | + python.exe -m pip installl --upgrade pip # Windows |
| 27 | + python -m pip installl --upgrade pip # linux, macOS |
| 28 | + ``` |
| 29 | +7. Install `jupyterlab`: |
| 30 | + ``` |
| 31 | + pip install jupyterlab |
| 32 | + ``` |
| 33 | +8. Install the Dyalog kernel Python module: |
| 34 | + ``` |
| 35 | + pip install dyalog-jupyter-kernel |
| 36 | + ``` |
| 37 | +9. Register the kernel with Jupyter: |
| 38 | + ``` |
| 39 | + python -m 'dyalog_kernel' install |
| 40 | + ``` |
| 41 | +10. Start jupyterlab (or notebook): |
| 42 | + ``` |
| 43 | + cd path/to/my/notebooks/ |
| 44 | + jupyter lab # or jupyter notebook |
| 45 | + ``` |
| 46 | +
|
| 47 | +Jupyter lab (and notebook) uses a web interface. It has a drop-down button labeled *New▾* where you can choose to create a new Dyalog APL notebook. You can also navigate to and click on any existing notebook (a file with the `.ipynb` extension) to open it. |
38 | 48 |
|
39 | 49 | ## Troubleshooting
|
40 | 50 |
|
|
0 commit comments