Giter VIP home page Giter VIP logo

jupyterq's People

Contributors

5jt avatar awilson-kx avatar cmccarthy1 avatar dianeod avatar elopezaguilera avatar jhanna-kx avatar jimdigriz avatar michaelawoods avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

jupyterq's Issues

VSCode integration

VSCode is well-suited to run Juptyter python notebooks and can do so with different (conda-) environments. However, jupyterQ won't launch on my computer even though it shows an option to select "Q(kdb+)" kernel (the option became available after installing jupyterq). There isn't a dettailed error message I could find, it just shows:
"Command 'Jupyter: Select a Kernel' resulted in an error (Timed out waiting to get a heartbeat from kernel process.)"

jupyter notebook cannot connect to kdb+ kernel

Hi,

When I start the jupyter notebook, and create a new jupyter notebook file, and put kernel as kdb+, it indicates that it cannot connect to it. I have already started q server running locally on my pc. Both q and jupyter running under same disk and conda environment. under. Window10

[I 12:26:37.996 LabApp] Creating new notebook in /
[I 12:26:38.220 LabApp] Kernel started: f430f80d-6a28-4966-9236-5d964501dd99, name: qpk
'2021.01.29T12:26:38.579 jupyterq_kernel.q. OS reports: The system cannot find the file specified.
[I 12:26:41.228 LabApp] KernelRestarter: restarting kernel (1/5), new random ports
'2021.01.29T12:26:41.576 jupyterq_kernel.q. OS reports: The system cannot find the file specified.
[I 12:26:44.244 LabApp] KernelRestarter: restarting kernel (2/5), new random ports
'2021.01.29T12:26:44.595 jupyterq_kernel.q. OS reports: The system cannot find the file specified.
[I 12:26:47.244 LabApp] KernelRestarter: restarting kernel (3/5), new random ports
'2021.01.29T12:26:47.605 jupyterq_kernel.q. OS reports: The system cannot find the file specified.
[I 12:26:50.257 LabApp] KernelRestarter: restarting kernel (4/5), new random ports
'2021.01.29T12:26:50.620 jupyterq_kernel.q. OS reports: The system cannot find the file specified.
[W 12:26:53.256 LabApp] KernelRestarter: restart failed
[W 12:26:53.257 LabApp] Kernel f430f80d-6a28-4966-9236-5d964501dd99 died, removing from map.
[W 12:26:56.876 LabApp] Timeout waiting for kernel_info reply from 0274f8c3-d2aa-409e-a6cb-9d0b60a7f799
[E 12:26:56.877 LabApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 0274f8c3-d2aa-409e-a6cb-9d0b60a7f799)

Use of Seaborn images within JupyterQ not supported

External Query

I have a table in kdb – just 5 columns and 100 rows – all numeric (features of a model let’s say)

I want to display the contents of this table in jupyterq from seaborn.

Specifically I want to:

  1. display the distribution of the 2nd column using the sns.displot function.
sns.displot(table, x=”feature2”)

in python

  1. display two comparative columns together – ie:
sns.displot(table, x="feature2", hue="feature3", stat="density")
  1. finally I want to display the relationships of all features against each other, perhaps with
sns.pairplot(table, diag_kind=’kde’)

Currently this behaviour is not supported likely due to the function used to provide inline displays in kxpy/kx_backend_inline.py, more research is needed on this however

Cant run notebook with "--kernel=qpk" flag

Using this:
jupyter console --kernel=qpk

I get this stack trace..

2018.04.13T15:23:00.371 .p.eval
[4] /Users/ab6/Downloads/jupyterq-master/jupyterq_pyzmq.q:2: pypop:.p.eval["list.pop"][;0]
^
Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/jupyter_console/ptshell.py", line 323, in init_kernel_info
reply = self.client.get_shell_msg(timeout=1)
File "/usr/local/lib/python3.6/site-packages/jupyter_client/client.py", line 77, in get_shell_msg
return self.shell_channel.get_msg(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/jupyter_client/blocking/channels.py", line 57, in get_msg
raise Empty
queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/jupyter-console", line 11, in
sys.exit(main())
File "/usr/local/lib/python3.6/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/usr/local/lib/python3.6/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/usr/local/lib/python3.6/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/jupyter_console/app.py", line 141, in initialize
self.init_shell()
File "/usr/local/lib/python3.6/site-packages/jupyter_console/app.py", line 114, in init_shell
client=self.kernel_client,
File "/usr/local/lib/python3.6/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/jupyter_console/ptshell.py", line 272, in init
self.init_kernel_info()
File "/usr/local/lib/python3.6/site-packages/jupyter_console/ptshell.py", line 326, in init_kernel_info
raise RuntimeError("Kernel didn't respond to kernel_info_request")
RuntimeError: Kernel didn't respond to kernel_info_request

How to assign the license?

Dear authors,
I am studying jupyterq. I try to run docker image but get the license error: licence error: k4.lic. I have a personal licence kc.lic but I don't know how to let jupyter find my licence file. I can enter q session by typing q in the terminal, so the environment in my macOS should be fine. Can you help to figure out the issue? Thanks.

IPython.display.Image not returning image

IPython.display error raised:

px:.p.import[`plotly.express]
ipd:.p.import[`IPython.display]

fig:px[`:scatter][`x pykw til 10; `y pykw til 10]
img:fig[`:to_image][`format pykw `png]
ipd[`:Image][img];

The above code should return a PNG image but returns nothing.

Actively attempting to display the plot using IPythons display function returns the following
image

RuntimeError: Kernel didn't respond to kernel_info_request and jupyterq_licensemgr not being found

Hello,

I'm getting "RuntimeError: Kernel didn't respond to kernel_info_request" when running "jupyter console --kernel=qpk" even though I followed the instructions for installing embedPy and JupyterQ exactly. I thought that I can avoid doing this by changing my default kernel to qpk, so I went ahead and tried to just launch a .ipynb, which returns 404s that I think are caused by jupyterq_licensemgr not being found. Any help would be appreciated. Below are more details:

I was following #49 but it has since been closed, so I decided to open a new issue. This is where my problem deviates:

d:\Dev\Anaconda3>conda activate jupyterqenv

(jupyterqenv) d:\Dev\Anaconda3>jupyter console --kernel=qpk
D:\Dev\Anaconda3\lib\site-packages\zmq\_future.py:679: RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use `asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy())` to avoid this warning.
  self._get_loop()
Traceback (most recent call last):
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 434, in init_kernel_info
    reply = self.client.get_shell_msg(timeout=1)
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 30, in wrapped
    raise e
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_client\utils.py", line 27, in wrapped
    return loop.run_until_complete(future)
  File "D:\Dev\Anaconda3\lib\site-packages\nest_asyncio.py", line 90, in run_until_complete
    return f.result()
  File "D:\Dev\Anaconda3\lib\asyncio\futures.py", line 201, in result
    raise self._exception.with_traceback(self._exception_tb)
  File "D:\Dev\Anaconda3\lib\asyncio\tasks.py", line 232, in __step
    result = coro.send(None)
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_client\client.py", line 142, in _async_get_shell_msg
    return await self.shell_channel.get_msg(*args, **kwargs)
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_client\channels.py", line 230, in get_msg
    raise Empty
_queue.Empty

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "D:\Dev\Anaconda3\Scripts\jupyter-console-script.py", line 10, in <module>
    sys.exit(main())
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_core\application.py", line 277, in launch_instance
    return super().launch_instance(argv=argv, **kwargs)
  File "D:\Dev\Anaconda3\lib\site-packages\traitlets\config\application.py", line 991, in launch_instance
    app.initialize(argv)
  File "D:\Dev\Anaconda3\lib\site-packages\traitlets\config\application.py", line 113, in inner
    return method(app, *args, **kwargs)
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_console\app.py", line 136, in initialize
    self.init_shell()
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_console\app.py", line 106, in init_shell
    self.shell = ZMQTerminalInteractiveShell.instance(parent=self,
  File "D:\Dev\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 552, in instance
    inst = cls(*args, **kwargs)
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 352, in __init__
    self.init_kernel_info()
  File "D:\Dev\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 437, in init_kernel_info
    raise RuntimeError("Kernel didn't respond to kernel_info_request") from e
RuntimeError: Kernel didn't respond to kernel_info_request

In the original thread, @cmccarthy1 suggested:

  1. it may be a conflict with PyQ ----> I do not have PyQ installed, so this shouldnt be the issue
  2. to confirm that embedPy and JupyterQ were installed exactly like the instructions ----> I did this too using the "Download and install a release" path for both
  3. to confirm that this is being done in an environment ----> I think that I'm doing this as indicated by the (jupyterqenv) at the start of my commands.

I thought that I can avoid having to launch the console with --kernel=qpk if I just edit my jupyter_notebook_config.py to change my default to qpk, which I have verified when launching jupyter notebooks kdb+Notebooks.ipynb, because the top right shows Q(kdb+)
My jupyter_notebook_config.py:

## The name of the default kernel to start
#  Default: 'qpk'
# c.MultiKernelManager.default_kernel_name = 'qpk'

This is what I get when running jupyter notebooks kdb+Notebooks.ipynb, even though I see that jupyterq_licensemgr is untouched

(jupyterqenv) d:\Dev\jupyterq-master>jupyter notebook kdb+Notebooks.ipynb
[I 15:58:02.882 NotebookApp] [jupyter_nbextensions_configurator] enabled 0.6.3
[W 15:58:03.998 NotebookApp] Loading JupyterLab as a classic notebook (v6) extension.
[W 2024-03-14 15:58:04.006 LabApp] 'file_to_run' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[W 2024-03-14 15:58:04.006 LabApp] 'file_to_run' has moved from NotebookApp to ServerApp. This config will be passed to ServerApp. Be sure to update your config before our next release.
[I 2024-03-14 15:58:04.013 LabApp] JupyterLab extension loaded from D:\Dev\Anaconda3\lib\site-packages\jupyterlab
[I 2024-03-14 15:58:04.014 LabApp] JupyterLab application directory is D:\Dev\Anaconda3\share\jupyter\lab
[W 15:58:04.022 NotebookApp] Error loading server extension jupyterq_licensemgr
    Traceback (most recent call last):
      File "D:\Dev\Anaconda3\lib\site-packages\notebook\notebookapp.py", line 2026, in init_server_extensions
        mod = importlib.import_module(modulename)
      File "D:\Dev\Anaconda3\lib\importlib\__init__.py", line 126, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
      File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
      File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'jupyterq_licensemgr'
[I 15:58:06.248 NotebookApp] Serving notebooks from local directory: d:\Dev\jupyterq-master
[I 15:58:06.248 NotebookApp] Jupyter Notebook 6.5.2 is running at:
[I 15:58:06.250 NotebookApp] http://localhost:8888/?token=3c70df641de04a2e7708cd0969baad57735f0fbcea675373
[I 15:58:06.250 NotebookApp]  or http://127.0.0.1:8888/?token=3c70df641de04a2e7708cd0969baad57735f0fbcea675373
[I 15:58:06.250 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 15:58:06.376 NotebookApp]

    To access the notebook, open this file in a browser:
        file:///C:/Users/limgrac/AppData/Roaming/jupyter/runtime/nbserver-26844-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=3c70df641de04a2e7708cd0969baad57735f0fbcea675373
     or http://127.0.0.1:8888/?token=3c70df641de04a2e7708cd0969baad57735f0fbcea675373
[W 15:58:10.892 NotebookApp] Notebook kdb+Notebooks.ipynb is not trusted
[W 15:58:11.560 NotebookApp] 404 GET /kx/license_check.json?_=1710446291363 (::1) 13.000000ms referer=http://localhost:8888/notebooks/kdb%2BNotebooks.ipynb
[I 15:58:11.567 NotebookApp] Kernel started: f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36, name: qpk
[I 15:58:14.537 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
[I 15:58:17.613 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
[I 15:58:20.709 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
[I 15:58:23.803 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
[I 15:58:26.882 NotebookApp] KernelRestarter: restarting kernel (5/5), new random ports
[W 15:58:29.966 NotebookApp] KernelRestarter: restart failed
[W 15:58:29.967 NotebookApp] Kernel f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36 died, removing from map.
[W 15:59:11.610 NotebookApp] Timeout waiting for kernel_info reply from f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36
[E 15:59:11.612 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36)
[W 15:59:13.557 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1): Kernel does not exist: f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36
[W 15:59:13.559 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1) 4.000000ms referer=None
[W 15:59:13.563 NotebookApp] 404 GET /kx/license_check.json?_=1710446353560 (::1) 2.000000ms referer=http://localhost:8888/notebooks/kdb%2BNotebooks.ipynb
[W 15:59:16.567 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1): Kernel does not exist: f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36
[W 15:59:16.569 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1) 4.000000ms referer=None
[W 15:59:16.573 NotebookApp] 404 GET /kx/license_check.json?_=1710446356569 (::1) 2.000000ms referer=http://localhost:8888/notebooks/kdb%2BNotebooks.ipynb
[W 15:59:21.561 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1): Kernel does not exist: f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36
[W 15:59:21.564 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1) 5.000000ms referer=None
[W 15:59:21.569 NotebookApp] 404 GET /kx/license_check.json?_=1710446361565 (::1) 2.000000ms referer=http://localhost:8888/notebooks/kdb%2BNotebooks.ipynb
[W 15:59:30.570 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1): Kernel does not exist: f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36
[W 15:59:30.572 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1) 4.000000ms referer=None
[W 15:59:30.577 NotebookApp] 404 GET /kx/license_check.json?_=1710446370572 (::1) 2.000000ms referer=http://localhost:8888/notebooks/kdb%2BNotebooks.ipynb
[W 15:59:47.565 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1): Kernel does not exist: f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36
[W 15:59:47.567 NotebookApp] 404 GET /api/kernels/f12ca5f2-9c4a-4c2c-86b8-de4c824f8d36/channels?session_id=064456aa770a44648a79b018cc328638 (::1) 4.000000ms referer=None
[W 15:59:47.572 NotebookApp] 404 GET /kx/license_check.json?_=1710446387567 (::1) 2.000000ms referer=http://localhost:8888/notebooks/kdb%2BNotebooks.ipynb

2 minutes to start a jupyterq kernel

Hi all,

when starting the jupyterq kernel we can see that the jupyterq_server.q q process is trying to make a connection to the 'outside'. See the strace below. Our servers are all secured and do not allow any connection to the outside.
However this side effect will timeout in 2 minutes making the q kernel unresponsive. Is it possible to turn this off?

Thanks,
Kim

(base) $strace -p 4928
Process 4928 attached
connect(12, {sa_family=AF_INET, sin_port=htons(443), sin_addr=inet_addr("74.50.49.235")}, 16^CProcess 4928 detached
<detached ...>

Interactive Bokeh control and ipywidegets issue

The following issue was raised by Seth Oldham in K4 Listbox, this issue presented here is to allow for up to date progress to be reported.

I have put together a simple notebook with an interactive Bokeh control using the following code

## /%python 

from ipywidgets import interact
import numpy as np

from bokeh.io import push_notebook, show, output_notebook
from bokeh.plotting import figure
from bokeh.resources import INLINE

x = np.linspace(0, 2*np.pi, 2000)
y = np.sin(x)

p = figure(title="simple line example", plot_height=300, plot_width=600, y_range=(-5,5),
           background_fill_color='#efefef')
r = p.line(x, y, color="#8888cc", line_width=1.5, alpha=0.8)

def update(f, w=1, A=1, phi=0):
    if   f == "sin": func = np.sin
    elif f == "cos": func = np.cos
    r.data_source.data['y'] = A * func(w * x + phi)
    push_notebook()

output_notebook(resources=INLINE)

show(p, notebook_handle=True);
interact(update, f=["sin", "cos"], w=(0,50), A=(1,10), phi=(0, 20, 0.1));

When I run that with the Python kernel, the interactive controls work as expected. But when I switch to the kdb kernel, and uncomment the /%python magic, the plot displays as expected but the controls don't have any effect. The logging from the notebook server does not reveal anything that seems useful, but I am including it here in case I'm missing something

jupyter-notebook[71056]: [W 09:43:29.914 NotebookApp] Trusting notebook /seth_dev/sample_bokeh.ipynb
jupyter-notebook[71056]: [I 09:43:30.194 NotebookApp] Starting buffering for 9a2cccee-2e5f-4652-a71e-664b7b914d62:1531d9414a2f49dda92e0e0c35b81ff2
jupyter-notebook[71056]: [W 09:43:30.994 NotebookApp] 404 GET /nbextensions/qtconsole/main.js?v=20190531123200 () 3.31ms referer=http:///notebooks/seth_dev/sample_bokeh.ipynb
jupyter-notebook[71056]: [W 09:43:31.120 NotebookApp] 404 GET /nbextensions/widgets/notebook/js/extension.js?v=20190531123200 (192.168.48.120) 2.22ms referer=http:///notebooks/seth_dev/sample_bokeh.ipynb
jupyter-notebook[71056]: [I 09:43:32.543 NotebookApp] Adapting to protocol v5.1 for kernel 9a2cccee-2e5f-4652-a71e-664b7b914d62
jupyter-notebook[71056]: [I 09:45:32.697 NotebookApp] Saving file at /seth_dev/sample_bokeh.ipynb
jupyter-notebook[71056]: [I 09:47:49.860 NotebookApp] Starting buffering for 9a2cccee-2e5f-4652-a71e-664b7b914d62:4eb97bf98a164d4785c8a1a44bf0cb4f
jupyter-notebook[71056]: [I 09:47:49.970 NotebookApp] Kernel shutdown: 9a2cccee-2e5f-4652-a71e-664b7b914d62
jupyter-notebook[71056]: [I 09:47:50.011 NotebookApp] Kernel started: 570a550e-a314-4b2d-978a-2d1462d0cf41
jupyter-notebook[71056]: [I 09:47:51.444 NotebookApp] Adapting to protocol v5.1 for kernel 570a550e-a314-4b2d-978a-2d1462d0cf41
jupyter-notebook[71056]: [I 09:49:32.655 NotebookApp] Saving file at /seth_dev/sample_bokeh.ipynb

Insights key (kc.lic) does not work

Hi there,
I have been working with jupyterq for a while now. I was trying to use KX/ml library for q, in order to study ml and profound data analytics with q, and I came to realize that I needed insights license in order to use this library.
Now I have my insights license, but when using it corresponding key (kc.lic) in Jupyter notebook, the kernel doesn't load. Instead, if I use my previous key (a regular license, not insights) it works perfectly fine. What can I do in order to solve this?

Kind Regards

Jupiterq cannot connect to the kernel

I am working on Mac. q works on the terminal but when I lunch it from Jupiter notebook it is not able to connect to the kernel.

here is the error message I get:

Last login: Sat Nov 3 18:29:36 on ttys000
Skanders-Air:~ skandersoltani$ jupyter console --kernel=qpk
'2018.11.03T18:47:14.013 libpython
[6] /anaconda3/q/p.q:8:
LMH set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:$":",M;L::M]];
.p:(:./p 2:(init;2))[L;H]]
^
'2018.11.03T18:47:14.013 cleanz
Traceback (most recent call last):
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 323, in init_kernel_info
reply = self.client.get_shell_msg(timeout=1)
File "/anaconda3/lib/python3.7/site-packages/jupyter_client/client.py", line 77, in get_shell_msg
return self.shell_channel.get_msg(*args, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/jupyter_client/blocking/channels.py", line 57, in get_msg
raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/anaconda3/bin/jupyter-console", line 11, in
sys.exit(main())
File "/anaconda3/lib/python3.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/app.py", line 141, in initialize
self.init_shell()
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/app.py", line 114, in init_shell
client=self.kernel_client,
File "/anaconda3/lib/python3.7/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 272, in init
self.init_kernel_info()
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 326, in init_kernel_info
raise RuntimeError("Kernel didn't respond to kernel_info_request")
RuntimeError: Kernel didn't respond to kernel_info_request
Skanders-Air:~ skandersoltani$ jupyter console --kernel=qpk
'2018.11.03T18:54:26.859 libpython
[6] /anaconda3/q/p.q:8:
LMH set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:$":",M;L::M]];
.p:(:./p 2:(init;2))[L;H]]
^
'2018.11.03T18:54:26.859 cleanz
Traceback (most recent call last):
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 323, in init_kernel_info
reply = self.client.get_shell_msg(timeout=1)
File "/anaconda3/lib/python3.7/site-packages/jupyter_client/client.py", line 77, in get_shell_msg
return self.shell_channel.get_msg(*args, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/jupyter_client/blocking/channels.py", line 57, in get_msg
raise Empty
_queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/anaconda3/bin/jupyter-console", line 11, in
sys.exit(main())
File "/anaconda3/lib/python3.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "/anaconda3/lib/python3.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/app.py", line 141, in initialize
self.init_shell()
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/app.py", line 114, in init_shell
client=self.kernel_client,
File "/anaconda3/lib/python3.7/site-packages/traitlets/config/configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 272, in init
self.init_kernel_info()
File "/anaconda3/lib/python3.7/site-packages/jupyter_console/ptshell.py", line 326, in init_kernel_info
raise RuntimeError("Kernel didn't respond to kernel_info_request")
RuntimeError: Kernel didn't respond to kernel_info_request

Feature request: HTML table output

Fantastic work on taking advantage of key capabilities of the Jupyter Notebook capability, including autocomplete, syntax coloring, inline help.

One thing that I think would be a big win for users would be to render tables using Jupyter's HTML rendering capability, in the same manner that Pandas dataframes are rendered.

To be clear, the current text-only rendering is entirely familiar to Q users and as such there are no negative surprises for experienced users. This would be a strict enhancement to the JupyterQ experience!

issue starting qpk kernel on Apple Silicon

running on Mac M1, macOS Ventura

q, embedPy installed and built from source for arm64 architecture
q p.q command runs ok and executes things like

q).p.eval["list.pop"][;0]

when launching qpk kernel though the following happens:

[I 2022-12-20 20:30:42.547 ServerApp] jupyterlab | extension was successfully linked.
[I 2022-12-20 20:30:42.724 ServerApp] nbclassic | extension was successfully linked.
[I 2022-12-20 20:30:42.724 ServerApp] panel.io.jupyter_server_extension | extension was successfully linked.
[I 2022-12-20 20:30:42.749 ServerApp] nbclassic | extension was successfully loaded.
[I 2022-12-20 20:30:42.749 LabApp] JupyterLab extension loaded from /opt/anaconda3/lib/python3.9/site-packages/jupyterlab
[I 2022-12-20 20:30:42.749 LabApp] JupyterLab application directory is /opt/anaconda3/share/jupyter/lab
[I 2022-12-20 20:30:42.751 ServerApp] jupyterlab | extension was successfully loaded.
[I 2022-12-20 20:30:42.752 ServerApp] panel.io.jupyter_server_extension | extension was successfully loaded.
[I 2022-12-20 20:30:42.753 ServerApp] The port 8888 is already in use, trying another port.
[I 2022-12-20 20:30:42.753 ServerApp] The port 8889 is already in use, trying another port.
[I 2022-12-20 20:30:42.753 ServerApp] Serving notebooks from local directory: /Users/HomeOffice/Downloads
[I 2022-12-20 20:30:42.753 ServerApp] Jupyter Server 1.18.1 is running at:
[I 2022-12-20 20:30:42.753 ServerApp] http://localhost:8890/lab?token=c67cc8bea3b36e802338dce7e897b7c3b0324bf2ae613dda
[I 2022-12-20 20:30:42.753 ServerApp] or http://127.0.0.1:8890/lab?token=c67cc8bea3b36e802338dce7e897b7c3b0324bf2ae613dda
[I 2022-12-20 20:30:42.753 ServerApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 2022-12-20 20:30:42.757 ServerApp]

To access the server, open this file in a browser:
    file:///Users/HomeOffice/Library/Jupyter/runtime/jpserver-25031-open.html
Or copy and paste one of these URLs:
    http://localhost:8890/lab?token=c67cc8bea3b36e802338dce7e897b7c3b0324bf2ae613dda
 or http://127.0.0.1:8890/lab?token=c67cc8bea3b36e802338dce7e897b7c3b0324bf2ae613dda

[W 2022-12-20 20:30:45.331 LabApp] Could not determine jupyterlab build status without nodejs
[W 2022-12-20 20:30:45.757 ServerApp] Notebook jupyterq-1.1.14/kdb+Notebooks.ipynb is not trusted
[I 2022-12-20 20:30:45.989 ServerApp] Kernel started: 3c9ccdf8-3afb-4746-9de2-f06de9df85b8
'2022.12.20T20:30:46.185 .p.eval
[5] /Users/HomeOffice/Downloads/jupyterq-1.1.14/jupyterq_pyzmq.q:2: pypop:.p.eval["list.pop"][;0]
^
[2] /opt/anaconda3/q/jupyterq_kernel.q:94: \l jupyterq_pyzmq.q / zero mq messaging
^
[I 2022-12-20 20:30:48.981 ServerApp] AsyncIOLoopKernelRestarter: restarting kernel (1/5), new random ports
'2022.12.20T20:30:49.231 .p.eval
[5] /Users/HomeOffice/Downloads/jupyterq-1.1.14/jupyterq_pyzmq.q:2: pypop:.p.eval["list.pop"][;0]
^
[2] /opt/anaconda3/q/jupyterq_kernel.q:94: \l jupyterq_pyzmq.q / zero mq messaging
^
.....
[W 2022-12-20 20:31:04.124 ServerApp] AsyncIOLoopKernelRestarter: restart failed
[W 2022-12-20 20:31:04.125 ServerApp] Kernel 3c9ccdf8-3afb-4746-9de2-f06de9df85b8 died, removing from map.
[W 2022-12-20 20:31:46.027 ServerApp] Timeout waiting for kernel_info reply from 3c9ccdf8-3afb-4746-9de2-f06de9df85b8
[W 2022-12-20 20:31:46.030 ServerApp] 404 GET /api/kernels/3c9ccdf8-3afb-4746-9de2-f06de9df85b8/channels?session_id=9bc789e9-6cd3-49b8-94f4-d923e1f342f8 (::1): Kernel does not exist: 3c9ccdf8-3afb-4746-9de2-f06de9df85b8
[W 2022-12-20 20:31:46.031 ServerApp] 404 GET /api/kernels/3c9ccdf8-3afb-4746-9de2-f06de9df85b8/channels?session_id=fd7ed5a9-f991-4d08-af89-29617de21d55 (127.0.0.1): Kernel does not exist: 3c9ccdf8-3afb-4746-9de2-f06de9df85b8

So it seems the kernel can start put embedPy somehow fails. Can't figure out what is the problem here.
Put all jupyterq files plus p.q and p.k into /opt/anaconda3/q and p.so and jupyterq.so into /opt/anaconda3/q/m64.
Added "DYLD_LIBRARY_PATH": "/opt/anaconda3/lib" to kernel.json for qpk kernel. To no avail.

Any help will be appreciated.

issue starting qpk kernel

Running on windows
fresh install of anaconda , but downgraded to 3.6 (tensorflow does not support yet)

q runs but does not load q.k (from q q.k) !- had to add q.q (with some show(s) to \l q.k

(C:\app\Anaconda3) C:\app\anaconda3\q>conda list "embedpy|jupyterq|kdb|python"
packages in environment at C:\app\Anaconda3:

Name Version Build Channel
embedpy 1.3.1 py36hfa6e2cd_0 kx
ipython 7.1.1 py36h39e3cac_0
ipython_genutils 0.2.0 py36h3c5d0ee_0
jupyterq 1.1.3 py36hfa6e2cd_0 kx
kdb 3.6 2018.10.23 kx
msgpack-python 0.5.6 py36he980bc4_1
python 3.6.6 hea74fb7_0
python-dateutil 2.7.5 py36_0

(C:\app\Anaconda3) C:\app\anaconda3\q>q
KDB+ 3.6 2018.10.23 Copyright (C) 1993-2018 Kx Systems
w64/ 12(16)core ....
"q.q started"
"loading p.k"

I get this when I try to print - python works in q but still no connection to kernel. took q.q out

(C:\app\Anaconda3) C:\Users\admin>q
KDB+ 3.6 2018.10.23 Copyright (C) 1993-2018 Kx Systems
w64/ 12(16) ...

q)\l p.q
q)print ("embedPy runs")
embedPy runs

but Kernel it times-out.... any way to debug? kernel_info_request - should print something into log...

dlls are there:
(C:\app\Anaconda3) C:\app\anaconda3\q\w64>ls -al
total 808
drwxr-xr-x 1 ... None 0 Nov 16 23:24 .
drwxr-xr-x 1 ... None 0 Nov 17 00:27 ..
-rwxr-xr-x 2 ... None 103936 Oct 12 06:00 jupyterq.dll
-rwxr-xr-x 2 ... None 120320 Sep 4 14:37 p.dll
-rwxr-xr-x 2 ... None 593408 Oct 23 13:26 q.exe

when I start kernel - do not see q process running in the process list - must be crashed. but when i start by hand it does not crashes

(C:\app\Anaconda3) C:\app\anaconda3\q>jupyter console --kernel=qpk
"q.q started"
"loading p.k"
Traceback (most recent call last):
File "C:\app\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 341, in init_kernel_info
reply = self.client.get_shell_msg(timeout=1)
File "C:\app\Anaconda3\lib\site-packages\jupyter_client\client.py", line 77, in get_shell_msg
return self.shell_channel.get_msg(*args, **kwargs)
File "C:\app\Anaconda3\lib\site-packages\jupyter_client\blocking\channels.py", line 57, in get_msg
raise Empty
queue.Empty

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\app\Anaconda3\Scripts\jupyter-console-script.py", line 10, in
sys.exit(main())
File "C:\app\Anaconda3\lib\site-packages\jupyter_core\application.py", line 266, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "C:\app\Anaconda3\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance
app.initialize(argv)
File "", line 2, in initialize
File "C:\app\Anaconda3\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "C:\app\Anaconda3\lib\site-packages\jupyter_console\app.py", line 142, in initialize
self.init_shell()
File "C:\app\Anaconda3\lib\site-packages\jupyter_console\app.py", line 115, in init_shell
confirm_exit=self.confirm_exit,
File "C:\app\Anaconda3\lib\site-packages\traitlets\config\configurable.py", line 412, in instance
inst = cls(*args, **kwargs)
File "C:\app\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 287, in init
self.init_kernel_info()
File "C:\app\Anaconda3\lib\site-packages\jupyter_console\ptshell.py", line 344, in init_kernel_info
raise RuntimeError("Kernel didn't respond to kernel_info_request")
RuntimeError: Kernel didn't respond to kernel_info_request

embedPy's prints not showing in the notebook

Hello,

When doing

print("toto")

in a jupyterq notebook nothing is printed.

When doing the same in a console (after loading p.q) it works.

Is it expected or is it due to something I customized in my setup? It makes debugging embedPy's python code very hard in a notebook.

Thanks,

Amaury

'cores error when starting kernel

Hi, I am getting 'cores error even though my .bashrc limits the number of cores. Is there any further config required for 64-bit personal licence?

[dk@server ~]$ cat ~/.bashrc
export PS1='\[\e[1;34m\][\u@\h \w]\$\[\e[m\] '
export PATH=$PATH:/home/quant/q:/home/quant/q/l64
export QHOME=/home/quant/q
export QLIC=/home/quant/q
 
alias ls='ls --color=auto'
alias q='rlwrap -r numactl --interleave=all --physcpubind=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 q'

[dk@server ~]$ q # starts successfully, as a test
KDB+ 3.5 2017.10.11 Copyright (C) 1993-2017 Kx Systems
l64/ 16(16)core 64532MB dk server 200.100.90.180 EXPIRE 2018.11.02 [email protected] KOD #1234567
 
q)

Client side:

dk@laptop:~$ ssh -i "certificate.pem" -L 8000:localhost:8888 dk@server

Server side:

[dk@server ~]$ jupyter notebook --no-browser --port=8888
[I 04:47:46.433 NotebookApp] JupyterLab beta preview extension loaded from /bin/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 04:47:46.433 NotebookApp] JupyterLab application directory is /bin/anaconda3/share/jupyter/lab
[I 04:47:46.441 NotebookApp] Serving notebooks from local directory: /home/dk
[I 04:47:46.441 NotebookApp] 0 active kernels
[I 04:47:46.441 NotebookApp] The Jupyter Notebook is running at:
[I 04:47:46.441 NotebookApp] https://server:8888/
[I 04:47:46.441 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
'2018.05.31T04:48:42.184 cores
[I 04:48:42.187 NotebookApp] Kernel started: 5fbbd3e0-6e23-4441-967e-d7f320490951
[I 04:48:45.186 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
'2018.05.31T04:48:45.195 cores
[I 04:48:48.196 NotebookApp] KernelRestarter: restarting kernel (2/5), new random ports
'2018.05.31T04:48:48.207 cores
[I 04:48:51.207 NotebookApp] KernelRestarter: restarting kernel (3/5), new random ports
'2018.05.31T04:48:51.216 cores
[I 04:48:54.218 NotebookApp] KernelRestarter: restarting kernel (4/5), new random ports
'2018.05.31T04:48:54.228 cores
[W 04:48:57.230 NotebookApp] KernelRestarter: restart failed
[W 04:48:57.230 NotebookApp] Kernel 5fbbd3e0-6e23-4441-967e-d7f320490951 died, removing from map.
[W 04:48:59.014 NotebookApp] Timeout waiting for kernel_info reply from 5fbbd3e0-6e23-4441-967e-d7f320490951
[E 04:48:59.017 NotebookApp] Error opening stream: HTTP 404: Not Found (Kernel does not exist: 5fbbd3e0-6e23-4441-967e-d7f320490951)

Cannot run with linux

I'm trying to install jupyterq. But it can't run. In jupyter notebook, the kernel dies immediately after I open a new Q notebook and tries to restart but fail.

Then I try the jupyter console with:

$ jupyter console --kernel=qpk

There is no response. So I suspend the process with ctrl + C.
It shows the error message as below:

Traceback (most recent call last):
  File "/home/lshang/.local/bin/jupyter-console", line 11, in <module>
    sys.exit(main())
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/lshang/.local/lib/python3.5/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-116>", line 2, in initialize
  File "/home/lshang/.local/lib/python3.5/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_console/app.py", line 141, in initialize
    self.init_shell()
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_console/app.py", line 114, in init_shell
    client=self.kernel_client,
  File "/home/lshang/.local/lib/python3.5/site-packages/traitlets/config/configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_console/ptshell.py", line 272, in __init__
    self.init_kernel_info()
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_console/ptshell.py", line 323, in init_kernel_info
    reply = self.client.get_shell_msg(timeout=1)
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_client/client.py", line 77, in get_shell_msg
    return self.shell_channel.get_msg(*args, **kwargs)
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_client/blocking/channels.py", line 50, in get_msg
    ready = self.socket.poll(timeout)
  File "/home/lshang/.local/lib/python3.5/site-packages/zmq/sugar/socket.py", line 695, in poll
    evts = dict(p.poll(timeout))
  File "/home/lshang/.local/lib/python3.5/site-packages/zmq/sugar/poll.py", line 99, in poll
    return zmq_poll(self.sockets, timeout=timeout)
  File "zmq/backend/cython/_poll.pyx", line 143, in zmq.backend.cython._poll.zmq_poll
  File "zmq/backend/cython/_poll.pyx", line 123, in zmq.backend.cython._poll.zmq_poll
  File "zmq/backend/cython/checkrc.pxd", line 12, in zmq.backend.cython.checkrc._check_rc
  File "/home/lshang/.local/lib/python3.5/site-packages/jupyter_console/app.py", line 123, in handle_sigint
    if self.shell._executing:
AttributeError: 'ZMQTerminalIPythonApp' object has no attribute 'shell'

It seems like an issue with jupyter. But it works pretty well with Python or R kernel. So I believe it is more likely to be an issue here.

jupyterq not working on ubuntu 18 anaconda 1.9.7

Hi, getting below error after I start anaconda navigator. please help

[I 22:17:43.157 LabApp] JupyterLab beta preview extension loaded from /home/appuprakhya/anaconda3/lib/python3.6/site-packages/jupyterlab
[I 22:17:43.157 LabApp] JupyterLab application directory is /home/appuprakhya/anaconda3/share/jupyter/lab
[I 22:17:43.161 LabApp] Serving notebooks from local directory: /home/appuprakhya
[I 22:17:43.161 LabApp] 0 active kernels
[I 22:17:43.161 LabApp] The Jupyter Notebook is running at: http://localhost:8888/?token=1b6fbcd9e5ef71ef684aeff88c079b3086540a34708904d3
[I 22:17:43.161 LabApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 22:17:43.162 LabApp]

Copy/paste this URL into your browser when you connect for the first time,
to login with a token:
http://localhost:8888/?token=1b6fbcd9e5ef71ef684aeff88c079b3086540a34708904d3
[16064:16064:0507/221743.467671:ERROR:sandbox_linux.cc(368)] InitializeSandbox() called with multiple threads in process gpu-process.
[I 22:17:43.468 LabApp] Accepting one-time-token-authenticated connection from 127.0.0.1
[16026:16046:0507/221743.488056:ERROR:browser_process_sub_thread.cc(217)] Waited 13 ms for network service
[W 22:17:43.528 LabApp] 404 GET /api/kernels/9a4ddcef-b51e-4eeb-bc8d-597310febcb4/channels?session_id=2a4166718d803dff7524aa565cee1fdb&token=2fef4481e2175c50567c6037420a4728ce04c82c4dd1fbfd (127.0.0.1): Kernel does not exist: 9a4ddcef-b51e-4eeb-bc8d-597310febcb4
[W 22:17:43.552 LabApp] 404 GET /api/kernels/9a4ddcef-b51e-4eeb-bc8d-597310febcb4/channels?session_id=2a4166718d803dff7524aa565cee1fdb&token=2fef4481e2175c50567c6037420a4728ce04c82c4dd1fbfd (127.0.0.1) 30.94ms referer=None
[I 22:17:44.298 LabApp] Kernel started: 78f5d1c1-eae0-4994-8220-b595e664b72f
[I 22:17:44.808 LabApp] Build is up to date
'2019.05.07T22:17:45.720 libpython
[6] /home/appuprakhya/anaconda3/q/p.q:8:
LMH set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:$":",M;L::M]];
.p:(:./p 2:(init;2))[L;H]]
^
'2019.05.07T22:17:45.720 cleanz
[I 22:17:47.298 LabApp] KernelRestarter: restarting kernel (1/5)
[I 22:17:47.675 LabApp] Kernel started: 009e7b75-425e-496c-922f-608d25e1c0a0
'2019.05.07T22:17:47.755 libpython
[6] /home/appuprakhya/anaconda3/q/p.q:8:
LMH set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:$":",M;L::M]];
.p:(:./p 2:(init;2))[L;H]]
^
'2019.05.07T22:17:47.755 cleanz
'2019.05.07T22:17:48.172 libpython
[6] /home/appuprakhya/anaconda3/q/p.q:8:
LMH set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:$":",M;L::M]];
.p:(:./p 2:(init;2))[L;H]]
^
'2019.05.07T22:17:48.172 cleanz
[I 22:17:50.304 LabApp] KernelRestarter: restarting kernel (2/5)
[I 22:17:50.675 LabApp] KernelRestarter: restarting kernel (1/5)
'2019.05.07T22:17:50.742 libpython
[6] /home/appuprakhya/anaconda3/q/p.q:8:
LMH set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:$":",M;L::M]];
.p:(:./p 2:(init;2))[L;H]]
^
'2019.05.07T22:17:50.742 cleanz
'2019.05.07T22:17:51.144 libpython
[6] /home/appuprakhya/anaconda3/q/p.q:8:
LMH set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:$":",M;L::M]];
.p:(:./p 2:(init;2))[L;H]]
^
'2019.05.07T22:17:51.144 cleanz

using ipywidgets

Most of the things I tried with ipywidgets work well, but here I don't understand what's wrong.

/%python
import ipywidgets as widgets
from IPython.display import display

out = widgets.Output()
def foo(x):
    with out:
        print(x)

b = widgets.Button(description='Button')
b.on_click(foo)

display(b)
display(out)

When calling foo('bar') directly it works well : 'bar' is printed in the Output widget.
When pressing the button it doesn't.

Doing exactly the same thing with a python kernel works.

pykx and jupyterq

Looks like pykx and jupyterq do not work well together. Is there a way to fix it?

Thanks,
Kim


(pykx308) λ jupyter console --kernel=qpk
'2024.06.17T05:42:32.193 type
[6] C:\edev\software\anaconda3\envs\pykx308\Lib\site-packages\pykx\lib\jupyterq_pyzmq.q:17: {(x?".")#x}
^
[5] C:\edev\software\anaconda3\envs\pykx308\Lib\site-packages\pykx\lib\jupyterq_pyzmq.q:17: zsock.fd:$[17<="I"${(x?".")#x}pyzmq[:pyzmq_version][]; / file descriptor for zeromq socke, need v>=17 for fileno
^
{"i"$zsocks[x][:fileno][]};
[2] C:\edev\private\jupyterq\jupyterq_windows-1.1.11\jupyterq_kernel.q:94: \l jupyterq_pyzmq.q
/ zero mq messaging
^
'2024.06.17T05:42:32.194 cleanz
[0] C:\edev\private\jupyterq\jupyterq_windows-1.1.11\jupyterq_kernel.q:32: .z.exit:{cleanz;cleans}
^
Traceback (most recent call last):
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_console\ptshell.py", line 434, in init_kernel_info
reply = self.client.get_shell_msg(timeout=1)
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_core\utils_init_.py", line 173, in wrapped
return loop.run_until_complete(inner)
File "C:\edev\software\anaconda3\envs\pykx308\lib\asyncio\base_events.py", line 616, in run_until_complete
return future.result()
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_client\client.py", line 143, in _async_get_shell_msg
return await ensure_async(self.shell_channel.get_msg(*args, **kwargs))
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_client\channels.py", line 233, in get_msg
raise Empty
_queue.Empty

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\edev\software\anaconda3\envs\pykx308\Scripts\jupyter-console-script.py", line 10, in
sys.exit(main())
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_core\application.py", line 280, in launch_instance
super().launch_instance(argv=argv, **kwargs)
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\traitlets\config\application.py", line 1074, in launch_instance
app.initialize(argv)
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\traitlets\config\application.py", line 118, in inner
return method(app, *args, **kwargs)
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_console\app.py", line 136, in initialize
self.init_shell()
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_console\app.py", line 106, in init_shell
self.shell = ZMQTerminalInteractiveShell.instance(parent=self,
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\traitlets\config\configurable.py", line 583, in instance
inst = cls(*args, **kwargs)
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_console\ptshell.py", line 352, in init
self.init_kernel_info()
File "C:\edev\software\anaconda3\envs\pykx308\lib\site-packages\jupyter_console\ptshell.py", line 437, in init_kernel_info
raise RuntimeError("Kernel didn't respond to kernel_info_request") from e
RuntimeError: Kernel didn't respond to kernel_info_request

JupyerQ won't response to kernel

I have the problem getting response from JupyerQ. It is running on Redhat Linux:

# conda list "embedpy|jupyterq|kdb|python"
# packages in environment at /bns/gfikdb/anaconda:
#
# Name                    Version                   Build  Channel
embedpy                   1.3.1            py35h14c3975_0    kx
ipython                   6.4.0                    py35_0
ipython_genutils          0.2.0            py35hc9e07d0_0
jupyterq                  1.1.3            py35h14c3975_0    kx
kdb                       3.6                  2018.10.23    kx
msgpack-python            0.5.6            py35h6bb024c_0
python                    3.5.5                hc3d631a_4
python-dateutil           2.7.3                    py35_0
python-graphviz           0.8.3                    py35_0
# q p.q
KDB+ 3.6 2018.11.09 Copyright (C) 1993-2018 Kx Systems
l64/ 2(2)core 193268MB root ###### ###### NONEXPIRE  ###### DEV HDB/RDB #52039

q)p)print('embedPy runs')
embedPy runs
q)
# jupyter console --kernel=qpk
Unrecognized message type history_request on channel sh
/bns/gfikdb/anaconda/lib/python3.5/site-packages/jupyter_console/ptshell.py:95: UserWarning: No lexer found for language 'q'. Treating as plain text.
  warn("No lexer found for language %r. Treating as plain text." % name)
Jupyter console 5.2.0

KDB+ v3.6 2018.11.09 kdb+ kernel for jupyter v 0.0.1


In [1]: til 1

and it stucks waiting forever when I ran til 1

Bqplot - ipywidget error

ipywidgets issue raised:

/%python
import numpy as np

size = 100

np.random.seed(0)

x_data = np.arange(size)

y_data = np.cumsum(np.random.randn(size)  * 100.0)

from bqplot import pyplot as plt

plt.figure(title='My First Plot')

plt.plot(x_data,x_data) 

returns error


e: bad argument type for built-in operation

  [1]  /Users/dianeodonoghue/q/p.q:13: .p.e:{$["def"~3#x;$[x[3]in"<*>";ei 3;eo];"class"~5#x;$[x[5]in"*>";ei 5;eo];eo]x}
                                             ^

  [0]  p)plt.plot(x_data,x_data)
       ^

Issue arises at line plt.plot(x_data,x_data) when initalising the scales for the interactive plot in ipywidgets, so changing the input data will not fix the issue:

/%python
from bqplot import marks,scales
dict={'x':scales.LinearScale(),
 'y':scales.LinearScale()}
marks.Lines(scales=dict)
evaluation error:

e: bad argument type for built-in operation

  [1]  /Users/dianeodonoghue/q/p.q:13: .p.e:{$["def"~3#x;$[x[3]in"<*>";ei 3;eo];"class"~5#x;$[x[5]in"*>";ei 5;eo];eo]x}
                                             ^

  [0]  p)marks.Lines(scales=dict)

Also, issue does not arise when running in a q terminal, only in a jupyter notebook.

Error upon attempting to start kernel (p.q:8)

Hi, getting this error when starting the kernel in JupyterLab. I've seen other similar issues to mine, but none with this exact error message.

JupyterLab log:

[I 2019-01-27 18:05:56.533 michael.xxxx restarter:110] KernelRestarter: restarting kernel (3/5), new random ports
'2019.01.27T18:05:56.810 libpython
  [6]  /opt/conda/q/p.q:8: 
 `L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$":",M;L::M]];
 .p:(`:./p 2:(`init;2))[L;H]]
    ^
'2019.01.27T18:05:56.810 cleanz
[I 2019-01-27 18:05:59.540 michael.xxxx restarter:110] KernelRestarter: restarting kernel (4/5), new random ports
'2019.01.27T18:05:59.782 libpython
  [6]  /opt/conda/q/p.q:8: 
 `L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$":",M;L::M]];
 .p:(`:./p 2:(`init;2))[L;H]]
    ^
'2019.01.27T18:05:59.782 cleanz
[I 2019-01-27 18:06:02.265 michael.xxxx log:158] 200 GET /user/michael.xxxx/api/contents/?content=1&1548630361885 (michael.xxxx@::ffff:x.x.x.x) 4.44ms
[W 2019-01-27 18:06:02.545 michael.xxxx restarter:100] KernelRestarter: restart failed
[W 2019-01-27 18:06:02.545 michael.xxxx kernelmanager:127] Kernel 9ffeef30-xxxx-468e-aaf2-a5911ac6ada8 died, removing from map.

jupyter-console:

$ JUPYTERQ_DEBUG=1 jupyter-console --kernel=qpk
jupyterq_kernel: loading embedPy
jupyterq_kernel: loading pyzmq
jupyterq_kernel: zeromq socket setup
jupyterq_kernel: check imports
jupyterq_kernel: check passwords
jupyterq_kernel: start server
jupyterq_kernel: completed loading
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
Unrecognized message type history_request on channel sh
`header`pheader`metadata`content!(`version`date`session`username`msg_type`msg..
/opt/conda/lib/python3.6/site-packages/jupyter_console/ptshell.py:95: UserWarning: No lexer found for language 'q'. Treating as plain text.
  warn("No lexer found for language %r. Treating as plain text." % name)
Jupyter console 5.2.0

KDB+ v3.6 2018.12.24 kdb+ kernel for jupyter, jupyterQ vdevelopment


In [1]: 

embedPy:

$ q p.q
KDB+ 3.6 2018.12.24 Copyright (C) 1993-2018 Kx Systems
l64/ 2()core 3601MB michael.xxxx ip-x-x-x-x.us-west-2.compute.internal x.x.x.x EXPIRE 2020.01.24 [email protected] KOD #5000xxx

q)p)print("embedPy works")
embedPy works

Any idea's on how to troubleshoot this error?

remote instance connect like qcon

Issue/feature that I would love to see is the support to connect to the remote instance of Q, something like qcon. In my case I have Q instances running and accumulating data, I connect to them and run some queries and then disconnect when I am done. Using hopen is not as comfortable as just qcon into the instance and using auto completion facilities of the jupyter console.

parse error when using colon in python

It looks like JupyterQ doesn't like ":" in python codes:

/%python
d={"a":2, "b":3, "c":4}

the error I get:

parse error
assign

Is there a workaround?

Thank you very much for your help!

kernel.json not created when installed via conda

Hi,

I installed jupyterq successfully via conda and noticed that it doesn't create kernel.json as part of the installation so I had to manually create that.

While it's an easy step, I think it would be great if that step was automated and users didn't have to worry about creating that file!

Everything else worked smoothly!

  • Himanshu

JupyterQ does not connect to the kernel

Hi,

I am having a similar issue to others regarding not being able to connect to the kernel.

I installed jupyterq on a windows machine using anaconda. I have then created a new environment as I already had a 64 bit version of Kdb on my machine. I activated the environment and attempt to run a jupyter notebook but encounter the following error.

'2019.10.15T10:43:21.616 libpython [6] C:\Users\MYUSERNAME\Anaconda3\envs\jupyterqenv\q\p.q:8: `L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$":",M;L::M]]; .p:(`:./p 2:(`init;2))[L;H]]

From previous closed issues it was asked to provide the versions of the following:

Name--------------------Version----------Build Channel
embedpy----------------1.3.2-------------py37hfa6e2cd_0 kx
ipython------------------7.8.0-------------py37h39e3cac_0
ipython_genutils--------0.2.0-------------py37_0
jupyterq-----------------1.1.7-------------py37hfa6e2cd_0 kx
kdb----------------------3.6---------------2019.08.20 kx
python------------------3.7.4-------------h5263a28_0
python-dateutil---------2.8.0-------------py37_0

When I attempt to run:

$ q p.q

it reports the following:

libpython [2] C:\Users\MYUSERNAME\Anaconda3\envs\jupyterqenv\q\p.q:8: `L`M`H set'@[system"python3 ",;c;{system"python ",c}];if[count M;if[k~key k:`$":",M;L::M]]; .p:(`:./p 2:(`init;2))[L;H]] ^ [0] (<load>) )

Other information which I think is relevant - I previously had a 32 bit version of Kdb installed on my windows machine. I thought this could have been the issue when trying to interface with 64 bit python so I removed all traces of it and reinstalled the 64 bit version using the conda command.

Really appreciate any help in advance.

Thanks!

Line-wrap Option?

It is hard too read when the q query is long. Breaking the query down isn't an option either.

Is it possible to add line-wrap to the JupyterQ?

Exposure of `%qtconsole` like behaviour within JupyterQ

External Request

The following email was received via [email protected] (edited for anonymity)

One of the features I like about running JupyterQ in Jupyter Lab, is the “open console for kernel” functionality. 
This allows you to get a terminal-like input window which looks & feels like a normal KDB session, but with the ability to draw charts etc. 
The main reason this is useful, is when you are diving into a function which you want to run line-by-line for debugging.

In Jupyter Notebook, this is supported when running a Python Kernel by typing a cell magic “%qtconsole”.
This launches a console for the running kernel. I tried this and “/%qtconsole” but neither work. 
Is this feature supported in jupyterq?

Within the current implementation of the Jupyter kernel this is not supported behaviour. Its addition would be welcomed but will need to be technically scoped before any timelines assurances of its addition can be made.

To do:

  • Scope out how Python handles the exposure of an interactive python console from the notebook
  • Scope out how JupyterLab provides the "open console for kernel" functionality
  • Highlight potential issues with providing an option similar to %qtconsole from a JupyterQ jupyter notebook
  • Implement or outline the reasoning behind why this will not be a feasible addition

Initial scoping work will dictate if this can be provided as a feature. Timeline on potential addition will be subject to this work.

non-ascii character symbol

show `$"\240";

Nothing is displayed if I do this in a notebook, while it works in the console.

The notebook log says

    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xa0 in position 26: invalid start byte

user validation

Is it possible to restrict access to the processes that have opened a port, just like with command-line argument -U password_file.txt ?
(do both the server and the kernel open a port ?)

JupyterQ incompatible with Python 3.8?

I just installed the latest miniconda3 for windows 64bit. When I hit the command

conda install -c kx jupyterq
Then it says

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - jupyterq -> python[version='>=3.5,<3.6.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']

Your python: python=3.8

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow
not available for the python version you are constrained to. Note that conda will not
change your python version to a different minor version unless you explicitly specify
that.

The following specifications were found to be incompatible with your CUDA driver:

  - feature:/win-64::__cuda==9.1=0
  - feature:|@/win-64::__cuda==9.1=0

Your installed CUDA driver is: 9.1

Sounds like jupyterQ is incompatible with python 3.8? Can you update your package in conda?

Jupyter server running after shutdown

An issue has been raised where jupyterq_server.q is still running after the jupyter kernel has been properly shut down.

The following fixes were attempted:

  1. Adding a timer function to jupyterq_server.q to check if the handle to the kernel was closed and exit the process if so
.z.ts:{if[0~count .z.W;exit 0]};system"t 5000"; 

but the above did not work and the server was still present

  1. Adding code to jupyterq_kernel.q, to kill the the server once the kernel is closed
ch.sh.shutdown_request:{[z;s;mc]if[last allowstop;snd[z;s]kr[`shutdown_reply;mc]md[`restart]mc .`content`restart;system"kill ",string neg[srvh]".z.i";exit 0]}

The above addition worked, however hasn’t been fully tested to ensure that it doesn’t cause any side effects that may impact the average user so is not currently being added as a fix

Below is the versions within the environment

kdb 4.0
jupyterq 1.1.7
python 3.6
anaconda-client (1.6.9)
ipykernel (4.8.0)
ipython (6.2.1)
ipython-genutils (0.2.0)
jupyter-client (5.2.2)
jupyter-contrib-core (0.3.3)
jupyter-core (4.4.0)
notebook (5.4.0)
prompt-toolkit (1.0.15)
qtconsole (4.3.1)

.z.u is null

.z.u returns null within Jupyter Notebook using jupyterq kernel

Tried on Linux & Windows, same result on both. As far as I can tell all other .z namespace variables are working fine

libpython error when running jupyterq_windows

Hi,

I am using jupyterq_windows-1.1.11 release and trying to run jupyterq on Python 3.9.7 with KDB 4.0 2021.07.12 on Windows 10 (all 64bit).
I am not using Conda. I was able to run install.bat without errors. I can run q as well. When I run jupyter notebook I see the below errors. What could be the issue?

'2022.03.27T13:57:20.462 libpython
[8] C:\q\p.q:14:
.P.env:not H~P;
.p:(:./p 2:(init;3))[L;H;B]]
^
[5] C:\q\p.k:1: \l p.q
^
[2] C:\q\jupyterq_kernel.q:92: \l p.k

Thanks

Kernel Q (kdb+) not connecting

Hi

I have set JupyterQ through Anaconda but when I run jupyter console --kernel=qpk I get this error. You know how can I fixt this?

C:\Users\emili\anaconda3\Lib\site-packages\zmq_future.py:679: RuntimeWarning: Proactor event loop does not implement add_reader family of methods required for zmq. Registering an additional selector thread for add_reader support via tornado. Use asyncio.set_event_loop_policy(WindowsSelectorEventLoopPolicy()) to avoid this warning.
self._get_loop()
'2024.04.29T06:05:10.837 No se puede encontrar el m¾dulo especificado.
[2] C:\Users\emili\anaconda3\q\jupyterq_kernel.q:28: acb::./jupyterq 2:acb,1 / add callback to q, calling cb below
^
Traceback (most recent call last):
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_console\ptshell.py", line 434, in init_kernel_info
reply = self.client.get_shell_msg(timeout=1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_client\utils.py", line 30, in wrapped
raise e
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_client\utils.py", line 27, in wrapped
return loop.run_until_complete(future)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\nest_asyncio.py", line 90, in run_until_complete
return f.result()
^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\asyncio\futures.py", line 203, in result
raise self._exception.with_traceback(self._exception_tb)
File "C:\Users\emili\anaconda3\Lib\asyncio\tasks.py", line 267, in __step
result = coro.send(None)
^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_client\client.py", line 143, in _async_get_shell_msg
return await self.shell_channel.get_msg(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_client\channels.py", line 230, in get_msg
raise Empty
_queue.Empty

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "C:\Users\emili\anaconda3\Scripts\jupyter-console-script.py", line 10, in
sys.exit(main())
^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_core\application.py", line 277, in launch_instance
return super().launch_instance(argv=argv, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\traitlets\config\application.py", line 991, in launch_instance
app.initialize(argv)
File "C:\Users\emili\anaconda3\Lib\site-packages\traitlets\config\application.py", line 113, in inner
return method(app, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_console\app.py", line 136, in initialize
self.init_shell()
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_console\app.py", line 106, in init_shell
self.shell = ZMQTerminalInteractiveShell.instance(parent=self,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\traitlets\config\configurable.py", line 552, in instance
inst = cls(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_console\ptshell.py", line 352, in init
self.init_kernel_info()
File "C:\Users\emili\anaconda3\Lib\site-packages\jupyter_console\ptshell.py", line 437, in init_kernel_info
raise RuntimeError("Kernel didn't respond to kernel_info_request") from e
RuntimeError: Kernel didn't respond to kernel_info_request

install.sh

echo QHOME must be set >2
echo QHOME:$QHOME does not exist >2

is the intent to write files named "2" or echo to stderr?

it would be prudent to check that 'q' exists on the users PATH before trying to execute;
ZO=$(echo "-1 string .z.o;"|q -q)

install.sh - not finding l64/jupyterq.so

Upon running install.sh, I get the following -
./install.sh

  • jupyter kernelspec install --user --name=qpk ./kernelspec
    [InstallKernelSpec] Removing existing kernelspec in /home/rkkumar/.local/share/jupyter/kernels/qpk
    [InstallKernelSpec] Installed kernelspec qpk in /home/rkkumar/.local/share/jupyter/kernels/qpk
  • cp ./jupyterq_b64.q ./jupyterq_help.q ./jupyterq_htmlgen.q ./jupyterq_kernel.q ./jupyterq_pyzmq.q ./jupyterq_server.q './jupyterq*.q_' /home/rkkumar/q
    cp: cannot stat './jupyterq*.q_': No such file or directory
  • cp -r ./kxpy /home/rkkumar/q
  • cp ./l64/jupyterq.so /home/rkkumar/q/l64
    cp: cannot stat './l64/jupyterq.so': No such file or directory

In order to fix the jupyterq.so not found issue, I have to do the following -
cd build/
vim makefile - change $(SDIR) to the path for jupyterq.c - e.g /home/linuxuser/jupyterq-master/src/c
make
mv l64 ../
cd ../

then run install.sh, which finds jupyterq.so. I can ignore the following, safely -
cp: cannot stat './jupyterq*.q_': No such file or directory

(Ubuntu 16.04)

Instructions to set up kdb kernel properly

Hello all,
are there instructions on how to set up kdb kerner for jupyter? I followed this page, created a json file, and copy-pasted there the info from:
https://code.kx.com/v2/ml/jupyterq/notebooks/

but I get this error when I open Q notebook in Jupyter:
Traceback (most recent call last):
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/web.py", line 1512, in _execute
result = yield result
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/notebook/services/sessions/handlers.py", line 73, in post
type=mtype))
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 79, in create_session
kernel_id = yield self.start_kernel_for_session(session_id, path, name, type, kernel_name)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 1063, in run
yielded = self.gen.throw(*exc_info)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/notebook/services/sessions/sessionmanager.py", line 92, in start_kernel_for_session
self.kernel_manager.start_kernel(path=kernel_path, kernel_name=kernel_name)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 1055, in run
value = future.result()
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/concurrent.py", line 238, in result
raise_exc_info(self._exc_info)
File "", line 4, in raise_exc_info
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/tornado/gen.py", line 307, in wrapper
yielded = next(result)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/notebook/services/kernels/kernelmanager.py", line 148, in start_kernel
super(MappingKernelManager, self).start_kernel(**kwargs)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/jupyter_client/multikernelmanager.py", line 110, in start_kernel
km.start_kernel(**kwargs)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/jupyter_client/manager.py", line 257, in start_kernel
**kw)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/jupyter_client/manager.py", line 203, in _launch_kernel
return launch_kernel(kernel_cmd, **kw)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/site-packages/jupyter_client/launcher.py", line 128, in launch_kernel
proc = Popen(cmd, **kwargs)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/subprocess.py", line 709, in init
restore_signals, start_new_session)
File "/home/nynfs01/svaury/bin/_dc2nix2d193/Python-3.6.3/lib/python3.6/subprocess.py", line 1344, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'q': 'q'

============================================

I checked q and QHOME:
-bash-4.2$ which q
alias q='/home/nynfs01/svaury/q//l64/q'
/home/nynfs01/svaury/q/l64/q
-bash-4.2$ echo $QHOME
/home/nynfs01/svaury/q/
-bash-4.2$

I do not use conda on the server.
-bash-4.2$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)

KDB+ 3.5 2017.11.30 Copyright (C) 1993-2017 Kx Systems
l64/ 88(1)core 773717MB

Thanks,
Rem

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.