Python not working in Q

https://learninghub.kx.com/forums/topic/python-not-working-in-q

Hello

I have installed embedpy and jupyterq but can’t use python in a Q terminal. I also can’t use Q in jupyter but I can use python in jupyter.

I get the following error any time I try to use python in a Q console. What does this error mean? I haven’t found anyone else experiencing this issue.

q.p))p)abc = "hello"
'libpython
[14] C:qp.q:14:
.P.env:not H~P;
.p:(`:./p 2:(`init;3))[L;H;B]]

 

Thank you!

Hi!

Yes, I do mean by using Conda. Thanks!

Hi,

Could you please provide some more information about you’re environment?

  • What version of Python are you running?

  • How did you install embedPy and JupyterQ?

The FAQ section of embedPy outlines some potential reasons for this problem https://code.kx.com/q/ml/embedpy/faq/#installing-embedpy-on-system-with-python-installed-from-source

Hi! Thanks for the reply. I installed Python 3.8 and then installed embedPy and JupyterQ together following the instruction guide using pip.

What does it mean to install Python “manually”? How can I install it automatically? That sounds much easier.

Thanks!


following the instruction guide using pip.


By this do you mean using conda? Installing Python from source is probably more accurate, if you installed Python via conda this issue is much less common. Our suggestion is that you install everything within a conda environment.

Could you try running this in command line, then starting a new q session?

export PATH="/usr/bin/anaconda3/bin:$PATH"

 

I am using Windows, by the way

Hello, thanks for the reply.

I tried this in command prompt and also Q and neither understood the command.

I manually added “C:UsersBanaconda3bin” to my environment PATH, but this didn’t help either.

Thanks!