cancel
Showing results for 
Search instead for 
Did you mean: 

How to run .py in KX Developer

evol
New Contributor II

Hi community

My problem is:" I can't open .py in KX Developer."

error: embedPy must be loaded to evaluate Python code

 

My version in Conda base env

kdb 4.0

embedPy 1.5

jupyterq 1.1.13

python 3.9.12

 

that's my terminal code for q

Screenshot from 2022-10-24 20-41-34.png

 

that's my code for Kx developer

Screenshot from 2022-10-24 20-42-54.png

 

So, how can I fix it? 

thanks all

 

Can I use python to call a q database? Or using q to compute python data in the same dialog box?

1 ACCEPTED SOLUTION

rocuinneagain
Valued Contributor
Valued Contributor

Have you installed embedpy?

https://code.kx.com/q/ml/embedpy/#build-and-install

Can you load and test it?

\l p.q
p)print(1+1)

 

View solution in original post

3 REPLIES 3

rocuinneagain
Valued Contributor
Valued Contributor

Have you installed embedpy?

https://code.kx.com/q/ml/embedpy/#build-and-install

Can you load and test it?

\l p.q
p)print(1+1)

 

evol
New Contributor II

It's work, thanks 

Also, I have 3 questions

01/ just like before python code, I download data from ibapi api

I can use q insert to q databases ? in the same dialog box or not ?

Can you give a simple example of Q and PYTHON  code

02/ or use python to select data from q databases to trade?

03/ What's different about embedPy and PYQ?

thanks

rocuinneagain
Valued Contributor
Valued Contributor

There are useful comparisons on this page: https://code.kx.com/pykx/1.3/comparisons.html 

 

You can expose python function to q using embedpy

You can do it all in a q file or as I like to do split out to a .py and a .q

Such as: https://github.com/rianoc/qXML 

 

kdb+ can also use websockets natively if needed 

https://code.kx.com/q/wp/websockets/