# kdb Jupyter Notebook

**URL:** <https://forum.kx.com/t/kdb-jupyter-notebook/11984>\
**Category:** Community Support\
**Tags:** kdb-and-q\
**Created:** [December 14, 2019, 7:34pm UTC](https://forum.kx.com/t/kdb-jupyter-notebook/11984 "2019-12-14T19:34:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![krisanharia](https://avatars.discourse-cdn.com/v4/letter/k/51bf81/32.png) [@krisanharia](https://forum.kx.com/u/krisanharia)\
**Post date:** [December 14, 2019, 7:34pm UTC](https://forum.kx.com/t/kdb-jupyter-notebook/11984/1 "2019-12-14T19:34:00Z")

</div>

Trying to open up kdb on Jupyter notebook

I’m running this on MAC. I go to terminal window and type Jupiter notebook…Jupyter Notebook opens up but the kernel cant be established. Tried switching in Change kernel but this hasn’t helped. NB its fine when I switch the kernel to python but fails for kdb&nbsp;

Error msg in Terminal window is as such&nbsp;

[I 19:30:27.414 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports

'2019.12.14T19:30:27.675 libpython

&nbsp; [6]&nbsp; /anaconda3/q/p.q:8:&nbsp;

&nbsp;`L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$“:”,M;L::M]];

&nbsp;.p:(`:./p 2:(`init;2))[L;H]]

&nbsp; &nbsp; ^

'2019.12.14T19:30:27.675 cleanz

[I 19:30:28.186 NotebookApp] Saving file at /Untitled1.ipynb

[I 19:30:30.421 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports

'2019.12.14T19:30:30.677 libpython

&nbsp; [6]&nbsp; /anaconda3/q/p.q:8:&nbsp;

&nbsp;`L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$“:”,M;L::M]];

&nbsp;.p:(`:./p 2:(`init;2))[L;H]]

&nbsp; &nbsp; ^

'2019.12.14T19:30:30.677 cleanz

[W 19:30:33.434 NotebookApp] KernelRestarter: restart failed

[W 19:30:33.434 NotebookApp] Kernel 457be2de-9a78-473a-8d8f-4f3dc3e3de81 died, removing from map.

[W 19:31:18.417 NotebookApp] Timeout waiting for kernel\_info reply from 457be2de-9a78-473a-8d8f-4f3dc3e3de81

Anyone able to help on this?

---

<div class="post-metadata">

**Author:** ![User7](https://avatars.discourse-cdn.com/v4/letter/u/7ea924/32.png) [@User7](https://forum.kx.com/u/User7)\
**Post date:** [December 16, 2019, 10:30am UTC](https://forum.kx.com/t/kdb-jupyter-notebook/11984/2 "2019-12-16T10:30:00Z")

</div>

Hi Krisan,

It looks like there could be a problem with the python path that you’re using.

Could you check if embedPy is working correcting by loading p.q in a q terminal and running the following commands?

```auto

$q

...

q)\l p.q

q) p)print(2+2)

q).p.import`builtins

```

Could you also provide the versions of embedpy, jupyterq, kdb and python that you are using. This can be found by running the following code:

```auto

conda list "embedpy|jupyterq|kdb|python"  

```

Thanks,

Diane&nbsp;
