Skip to content

Frequently-asked questions

Can I run the kernel remotely?

Yes, see the Jupyter documentation here. If you are looking to set up a notebook server for multiple users Jupyter recommends JupyterHub

Additional setup for JupyterQ under JupyterHub

If you see this error when running the Jupyter console on the server you're installing on:

You may need to set LD_LIBRARY_PATH/DYLD_LIBRARY_PATH to your 
python distribution's library directory: $HOME/anaconda3/lib

You will need to export the LD_LIBRARY_PATH and add this to your configuration file for JupyterHub

c.Spawner.env_keep.append('LD_LIBRARY_PATH')

Why is setting LD_LIBRARY_PATH/DYLD_LIBRARY_PATH required with Anaconda python?

Anaconda packages libraries which may conflict with the system versions of these libraries loaded by q at startup e.g. libssl or libz. There is a conda packaged version of q which doesn't require setting LD_LIBRARY_PATH, if you are already using Anaconda then you can install it with

conda install -c kx kdb

How can I save the contents of a notebook to a q script?

To dump the entire contents of the code cells in a notebook to a q script use File > Download as > Q (.q).

save q script

To save the contents of individual cells as q scripts use /%savescript in a cell.

Loading and saving scripts

Can I mix Python and q code in the same notebook?

Yes, either with p) or /%python.

Examples

Is there a Docker image available?

Yes, if you have Docker installed, you can run:

docker run -it --rm -p 8888:8888 kxsys/jupyterq

Further instructions for running headless and building the image are available

Always Linux

Even if you are running Docker on macOS or Windows the version of kdb+ is 64-bit Linux, and the Docker image is Linux.