0

Have installed kdb+ 64-bit to a Windows 10 machine.

Running within Anaconda/Spyder, when I import PyQ, I get an error message that the kernel died. No issues running q stand alone from the command line.

Both of these

import pyq

from pyq import q

Give this error, along with a kernel restart.

Kernel died, restarting

version info:

Spyder 3.3.1

Python 3.6

kdb+/q 3.6 (64-bit)

Any ideas how to resolve this?

Chris
  • 1,401
  • 4
  • 17
  • 28
  • What version of pyq-kernel do you use? If you think you've encountered a bug in pyq, it is best to report it at . – Alexander Belopolsky Feb 10 '19 at 15:51
  • running version 4.1.4 of pyq, 5.9.2 PyQt5. don't know that this is necessarily a pyq bug, you have reason to believe it is? – Chris Feb 11 '19 at 01:30

1 Answers1

0

You cannot import pyq into a regular python session, but you should be able to connect Spyder to a pyq kernel. First, install pyq-kernel:

pip install pyq-kernel
pyq -m pyq.kernel install

Second, start a pyq kernel session on the console and find the kernel id:

$ jupyter console --kernel=pyq_3

In [2]: %connect_info
{
  "shell_port": 60484,
  "iopub_port": 60485,
  "stdin_port": 60486,
  "control_port": 60487,
  "hb_port": 60488,
  "ip": "127.0.0.1",
  "key": "ca3c4bc5-a55c552fdb14da48fda44b9d",
  "transport": "tcp",
  "signature_scheme": "hmac-sha256",
  "kernel_name": ""
}

Paste the above JSON into a file, and connect with:
    $> jupyter <app> --existing <file>
or, if you are local, you can connect with just:
    $> jupyter <app> --existing kernel-25218.json
or even just:
    $> jupyter <app> --existing
if this is the most recent Jupyter kernel you have started.

Kernel id is the number in the `kernel-###.json file.

Finally, go the menu under the gear icon in the Spyder's IPython console window, select "Connect to an existing kernel" and enter the kernel id that you have found in the second step in the "Kernel ID/Connection file" box.

Alexander Belopolsky
  • 2,228
  • 10
  • 26
  • thanks, saw your response on github as well...haven't tried this yet, but will respond once I do – Chris Feb 12 '19 at 09:49