Setting up your machine-learning environment
There are three methods available to set up an environment in which to work on Machine Learning within kdb+/q:
- with Anaconda
- with Docker
- do it yourself
Download via Anaconda
The three Kx packages can be downloaded from anaconda.org/kx:
These are available for Linux, Windows and macOS.
They are in a dependency tree. If you install
embedpy it will automatically install
kdb. If you install
jupyterq it will install
The commands are as follows:
conda install -c kx kdb conda install -c kx embedpy conda install -c kx jupyterq
At present, the packages work only from the base environment.
Before starting q, run the following commands:
source deactivate base source activate base
When you first run q it will ask the following questions:
Please provide your email (requires validation): Please provide your name: If applicable please provide your company name (press enter for none):
This will then contact the Kx license server, which will generate a
kc.lic and send an email confirmation link to validate it.
1. Install Docker
2. Run embedPy
$ docker run -it --name myembedpy kxsys/embedpy KDB+ 3.5 2017.11.08 Copyright (C) 1993-2017 Kx Systems l64/ 4(16)core 7905MB kx 0123456789ab 172.17.0.2 EXPIRE 2018.12.04 email@example.com KOD #0000000 q)
You can drop straight into Bash with:
$ docker run -it kxsys/embedpy bash kx@b8279373a1d1:~$ conda info active environment : kx active env location : /home/kx/.conda/envs/kx ... kx@b8279373a1d1:~$ q KDB+ 3.5 2018.04.25 Copyright (C) 1993-2018 Kx Systems l64/ 8()core 64304MB kx b8279373a1d1 172.17.0.3 EXPIRE 2019.05.21 firstname.lastname@example.org KOD #0000000 q)
3. Run JupyterQ
docker run --rm -it -p 8888:8888 kxsys/jupyterq
Now point your browser at
Allows Jupyter notebooks to be used within a Docker container.