KxSystems / embedPy

Allows the kdb+ interpreter to call Python functions
https://code.kx.com/q/interfaces
Apache License 2.0
87 stars 42 forks source link

Can't install on macOS #45

Closed gusutabopb closed 6 years ago

gusutabopb commented 6 years ago

I have followed the instructions on README but can't manage to install embedPy. I keep getting the following error:

'dlsym(0x7fad1a602570, init): symbol not found
  [4]  /Users/path/to/my/project/embedPy/p.q:6:
 `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>)

I have tried both with in my Miniconda environment and a using virtualenv (based on the sashkab/python/python36 brew package). I have also tried setting DYLD_LIBRARY_PATH as mentioned in the README and not setting it at all. I keep getting the same error every time (and since I am no Q expert, I don't really understand what's going on).

I am using the on-demand version of Q (64-bit).

mcg1969 commented 6 years ago

@gusutabopb have you tried the conda package yet? If you're using Miniconda, just do conda install -c kx embedpy and see how it goes.

jhanna-kx commented 6 years ago

Hi, You can get this error if you also have PyQ installed, it has it's own p.so which is not compatible with embedPy, currently only embedPy or PyQ can be installed at the same time.

If you've installed PyQ make sure you copy p.so from the latest release to QHOME/m64and p.q and p.k from the same archive to QHOME

Alternatively if you are using conda you can just install with the instructions from @mcg1969

gusutabopb commented 6 years ago

@mcg1969 @jhanna-kx Thank you! The conda package worked perfectly. I just had to move my license to conda info --root/envs//q` and it worked great.

Please feel free to close this issue!