我已经在Windows10计算机上安装了kdb+ 64位。
在Anaconda/Spyder中运行时,当我导入PyQ时,我得到一条错误消息,告诉我内核死了。从命令行单独运行q没有问题。
这两个
import pyq
from pyq import q给出这个错误,同时重启内核。
Kernel died, restarting版本信息:
Spyder 3.3.1
Python 3.6
kdb+/q 3.6 (64位)
有什么办法解决这个问题吗?
发布于 2019-02-12 05:47:53
您不能将pyq导入到常规的python会话中,但您应该能够将Spyder连接到pyq内核。首先,安装pyq-kernel:
pip install pyq-kernel
pyq -m pyq.kernel install其次,在控制台上启动pyq内核会话,并找到内核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.内核id是` Kernel -#.json文件中的编号。
最后,进入IPython控制台窗口中齿轮图标下的菜单,选择“连接到现有内核”,并在“内核id /连接文件”框中输入您在第二步中找到的内核ID。
https://stackoverflow.com/questions/54614378
复制相似问题