KxSystems / pyq

PyQ — Python for kdb+
http://code.kx.com/q/interfaces
Apache License 2.0
190 stars 49 forks source link

AttributeError: module 'pexpect' has no attribute 'spawn' #50

Closed dickreuter closed 6 years ago

dickreuter commented 6 years ago

When launching ipython notebook on my windows machine with the KDB kernel I get the following error message when the kernel shuts down almost immediately.

Any suggestions what could cause this?

[I 18:31:39.365 NotebookApp] Kernel started: 1d8f3d63-a289-46b9-94ca-0f53521b9a02
Traceback (most recent call last):
  File "C:\anaconda3\envs\databases32\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\anaconda3\envs\databases32\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\anaconda3\envs\databases32\lib\site-packages\kdbq_kernel\__main__.py", line 3, in <module>
    IPKernelApp.launch_instance(kernel_class=KdbQKernel)
  File "C:\anaconda3\envs\databases32\lib\site-packages\traitlets\config\application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-121>", line 2, in initialize
  File "C:\anaconda3\envs\databases32\lib\site-packages\traitlets\config\application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "C:\anaconda3\envs\databases32\lib\site-packages\ipykernel\kernelapp.py", line 465, in initialize
    self.init_kernel()
  File "C:\anaconda3\envs\databases32\lib\site-packages\ipykernel\kernelapp.py", line 376, in init_kernel
    user_ns=self.user_ns,
  File "C:\anaconda3\envs\databases32\lib\site-packages\traitlets\config\configurable.py", line 412, in instance
    inst = cls(*args, **kwargs)
  File "C:\anaconda3\envs\databases32\lib\site-packages\kdbq_kernel\kernel.py", line 106, in __init__
    self._start_kdbq()
  File "C:\anaconda3\envs\databases32\lib\site-packages\kdbq_kernel\kernel.py", line 127, in _start_kdbq
    child = pexpect.spawn("q", echo=False, encoding='utf-8')
AttributeError: module 'pexpect' has no attribute 'spawn'
[I 18:31:42.327 NotebookApp] KernelRestarter: restarting kernel (1/5), new random ports
sashkab commented 6 years ago
kdbq_kernel

This doesn't look like something related to PyQ.

If you would like to use PyQ supported kernel, please use pyq-kernel. You can install it by using following commands:

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

Afterwards, start IPython notebook and select PyQ kernel.

vsidor commented 5 years ago
kdbq_kernel

This doesn't look like something related to PyQ.

If you would like to use PyQ supported kernel, please use pyq-kernel. You can install it by using following commands:

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

Afterwards, start IPython notebook and select PyQ kernel.

I assume there is a typo, should have: python -m pyq.kernel install

sashkab commented 5 years ago

I assume there is a typo, should have:

I don't see a typo. When launching any PyQ related process, you should use pyq, not python.