Changing the IPython interpreter

2019-06-27 10:00发布

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.

1条回答
我命由我不由天
2楼-- · 2019-06-27 10:23

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".

查看更多
登录 后发表回答