KX Community

Find answers, ask questions, and connect with our KX Community around the world.
KX Community Guidelines

Home Forums kdb+ Python not working in Q

  • Python not working in Q

    Posted by biggorilla on April 19, 2022 at 12:00 am

    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!

    biggorilla replied 8 months, 1 week ago 3 Members · 7 Replies
  • 7 Replies
  • eohara

    Member
    April 20, 2022 at 12:00 am

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

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

     

  • biggorilla

    Member
    April 20, 2022 at 12:00 am

    I am using Windows, by the way

  • biggorilla

    Member
    April 20, 2022 at 12:00 am

    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!

  • cmccarthy1

    Member
    April 28, 2022 at 12:00 am

    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

  • biggorilla

    Member
    April 28, 2022 at 12:00 am

    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!

  • cmccarthy1

    Member
    April 28, 2022 at 12:00 am

    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.

  • biggorilla

    Member
    May 2, 2022 at 12:00 am

    Hi!

    Yes, I do mean by using Conda. Thanks!

Log in to reply.