Search code examples
pythonipythonkdb+q-langpyq

Changing the IPython interpreter


I'm using Python with kdb+. To do this I'm using PyQ, which brings Python and kdb+/Q to the same process and allows both languages to operate on the same set of data/memory space.

After some effort, I am able to load Python into the kdb+/Q process on OS X using the instructions from here, i.e. running

q python.q [-<python option>@ <python option value>]* python-script

This is all good, but I would like to use the above command as interpreter in IPython (Notebook for research, etc.).

So, how do you change the interpreter in IPython? I've seen the FAQ here, but creating a virtual environment doesn't seem like the solution. Ideally I would create a profile for IPython.

Many thanks.


Solution

  • You can install the latest version of PyQ using the following pip command:

    pip install -i https://pypi.enlnt.com --no-binary pyq pyq
    

    This should install a pyq executable. To run IPython, do

    pyq -mIPython
    

    For more information about PyQ and IPython, see my presentation "Exploring KDB+ Data in IPython Notebooks".