Closed cppt closed 5 years ago
Your bug report is confusing and not full.
Title says "'Kernel died, restarting' error when importing pyq in Anaconda", but in the issue description you say that "No, primarily pip".
Are you using notebooks? If so, please provide detailed answers to the questions in descriptions. What version of the PyQ kernel are you using?
I am not familiar with the Spyder, but I assume the "Kernel died, ..." message comes from the Spyder backend. Unless you somehow reconfigured it to start "q python.q", it runs regular python and importing pyq in regular python is not supported.
Spyder is a Python IDE. The error messages displays within the console/ipython command line when running the import. Do you have suggestions on integrating it with python programs in that case?
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.
Posting a bug report per suggestion on SO.
Questions
Win10 64-bit
pyq --versions
, if PyQ isn't operational, please provide Python interpreter version and PyQ versionpython -V; python3 -V; pip list | grep pyq
:pyq version 4.1.4
64-bit kdb+
QLIC
set? Please provide outputenv | grep QLIC
on linux/macOS, orset|grep QLIC
on Windows.No QLIC variable set
No, installed directly
[x] Where is your
QHOME
? Please provide outputenv | grep QHOME
on linux/macOS, orset|grep QHOME
on Windows.QHOME set as 'C:\q'
[x] Do you use Conda? If so, what version?
No, primarily pip
Steps to reproduce the issue
OR
Expected result
Package imported successfully (no return within Spyder)
Actual result
Workaround
NA