Jupyter kernel for kdb+
Jupyter kernel for kdb+. Features include
.z
/.h
/.Q
/.j
namespace functions, and user-defined variablesembedPy
and matplotlib
Note:
As of September 5, 2020. Python 3.5 has reached end of life as indicated here. As such official support for this Python Version has been removed in favour of updates to support Python 3.8.
You can either
There are two ways to install JupyterQ on your local machine:
Make sure you have installed embedPy
Download a release archive from the releases page, and unzip it.
Install the required Python packages with Pip or Conda
# pip
pip install -r requirements.txt
# conda
conda install --file requirements.txt
Ensure QHOME
is set and you have a working version of q in your PATH
. Note that Jupyter will not pick up Bash aliases when starting q: the location of the q executable needs to be in your PATH
.
Run the install script
Linux/macOS
./install.sh
Windows
install.bat
Download and install either the full Anaconda distribution or Miniconda for Python3.
Use Conda to install JupyterQ and its dependencies
conda install -c kx jupyterq
Ensure you can run q before running JupyterQ for the first time. You may need to obtain an on-demand licence
q
…
q)\\
NOTE
If installing on a system which already has kdb+ we recommended installing JupyterQ, embedPy and the conda packaged version of kdb+ in a conda environment, this can be done using the following steps
# create a new environment and install jupyterq and its dependancies
conda create -n jupyterqenv -c kx jupyterq
# activate the environment for use
conda activate jupyterqenv
It should be noted that in this case JupyterQ, embedPy and the conda installed kdb can only be run from this activated environment.
To run the Jupyter console
jupyter console --kernel=qpk
To run the example notebook
jupyter notebook kdb+Notebooks.ipynb
If you have Docker installed you can alternatively run:
docker run -it --name myjupyterq -p 8888:8888 kxsys/jupyterq
Now point your browser at http://localhost:8888/notebooks/kdb%2BNotebooks.ipynb.
For subsequent runs, you will not be prompted to redo the license setup when calling:
docker start -ai myjupyterq
To change the port or use the image to run your own notebooks, see the Docker README.
See instructions regarding headless/presets.
See build instructions for the image.
See the notebook kdb+Notebooks.ipynb
for full interactive examples and explanation. (It should be legible on GitHub.)
See documentation on the JupyterQ homepage.