Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow installation of embedPy alongside PyQ #30

Closed
2 tasks done
abalkin opened this issue Nov 12, 2017 · 5 comments
Closed
2 tasks done

Allow installation of embedPy alongside PyQ #30

abalkin opened this issue Nov 12, 2017 · 5 comments
Assignees
Milestone

Comments

@abalkin
Copy link
Contributor

abalkin commented Nov 12, 2017

Currently, both PyQ and embedPy install p.so in QHOME and this name conflict means that users cannot use both in the same kdb+ instance.

Why would users want to have both PyQ and embedPy? While the two projects provide some overlapping functionality, PyQ is primarily focused on accessing kdb+ data from Python while embedPy has more features for q programers to call Python functions.

Implementation plan

  • rename p.so in PyQ to pyq.so
  • provide means of (optionally?) installing embedPy components into a PyQ environment, e.g, pip install pyq[embedpy]
@abalkin
Copy link
Contributor Author

abalkin commented Nov 12, 2017

@jhanna-kx, @effbiae - what do you think of this plan? Do you think having emdedPy pip installable independently from PyQ is something of interest?

@abalkin abalkin self-assigned this Nov 12, 2017
@abalkin abalkin added this to the Release 4.2.0 milestone Nov 12, 2017
@abalkin
Copy link
Contributor Author

abalkin commented Nov 12, 2017

Can pip compile (c)source modules?

Yes, but it relies on distutils/setuptools and the logic in the setup.py file to achieve that. Try

pip install -v --no-binary pyq pyq

to watch how p.so is compiled in pyq.

can pip give us more config info about the python environment?

No. Pip is a package manager, not a build tool. In Python 3, distutils gives you full access to everything in the python's own (autoconf-generated) Makefile, which is likely more than you would ever want to know.

On the other hand, I am currently experimenting with conda (the package manager for the Anaconda Python distribution) and I think it deserves a serious consideration. Apart from being very popular among data scientists, conda has the following advantages over pip:

  1. Support for non-python packages. For example, it installs its own ffi and blas libs.
  2. Binary relocation support. Conda knows how to patch RPATH on Linux and how to do equivalent name tool magic on macOS.
  3. I did not investigate this aspect, but conda is likely to be more friendly to commercial software than pip. AFAIK, it has the concept of "channels" that allow publishers control what different classes of users can install.

/cc: @effbiae

abalkin added a commit that referenced this issue Nov 13, 2017
abalkin added a commit that referenced this issue Nov 13, 2017
abalkin added a commit that referenced this issue Nov 13, 2017
TODO: Make numpy optional in embedPy.
abalkin added a commit that referenced this issue Nov 13, 2017
TODO: Make numpy optional in embedPy.
abalkin added a commit that referenced this issue Nov 13, 2017
abalkin added a commit that referenced this issue Nov 13, 2017
abalkin added a commit that referenced this issue Nov 21, 2017
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
TODO: Make numpy optional in embedPy.
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
abalkin added a commit that referenced this issue Feb 20, 2018
@abalkin
Copy link
Contributor Author

abalkin commented May 24, 2018

pip install pyq installs embedPy if its requirements are met: Python 3 with numpy.

@abalkin abalkin closed this as completed May 24, 2018
@TKTheTechie
Copy link

Hi, I'm trying to run pyq alongside embedPy but I get the following error:

'/opt/miniconda3/envs/kdb/q/l64/./p.so: undefined symbol: init
  [2]  /opt/miniconda3/envs/kdb/q/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>)

  )^C'stop
  [3]  (.Q.dr)

I'm not clear if this issue has been resolved. If has, could you provide steps on how to get both these items to be working together?

@sashkab
Copy link
Contributor

sashkab commented Aug 23, 2018

@thomas-kunnumpurath please open new issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants