Kappy broken on python 3.8

18 views
Skip to first unread message

Ryan Krueger

unread,
Apr 29, 2020, 2:32:31 AM4/29/20
to kappa-users
I recently upgraded to python 3.8 and kappy is no longer working -- it doesn't have the bin files. When I downgrade back to 3.6, the kappy installation from pip works.

Walter Fontana

unread,
Apr 29, 2020, 8:40:34 AM4/29/20
to kappa-users
I’m using 3.7 and had a similar problem with kappy yesterday. (I’m at my first experience with kappy and can’t tell you how much I love undocumented academic software!) My problem was that when I compiled the Kappa binaries with "make all” I get the usual set of command line tools, but no software agents; when I compiled with “make agents” I get all the software agents but no command line tools (even without intervening "make clean”). Once I had the software agents, I supplied the path to the method that generates an instance, eg:

kasim=kappy.KappaStd("/Users/wf7/Walter/KappaTools/Tools/KaSim/bin”)

I presume you could also set an environment variable. 

One reason I’m experimenting with the python API in detail is to write documentation for the manual... In the meantime, peruse the comments in the code.

But maybe the experts can chime in.

w

On Apr 29, 2020, at 2:32 AM, Ryan Krueger <ryan...@umich.edu> wrote:

I recently upgraded to python 3.8 and kappy is no longer working -- it doesn't have the bin files. When I downgrade back to 3.6, the kappy installation from pip works.

--
You received this message because you are subscribed to the Google Groups "kappa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kappa-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kappa-users/ad597c49-10be-4176-bf96-cae341d53f52%40googlegroups.com.

Walter Fontana

unread,
Apr 29, 2020, 8:47:01 AM4/29/20
to kappa-users
Apologies. I think I previously answered a question you did not ask…
(But I would like to turn my “answer” into a question: why does "make all" not make all?)

pip installation with python 3.7.2 worked for me.

w

Ryan Krueger

unread,
Apr 29, 2020, 10:46:17 AM4/29/20
to kappa-users
Ah, I should clarify.

Historically, kappy ships with its own binaries. In this way, you can either supply your own bin path as you outlined above, or use the default kappy software agents. Sometimes I want to explicitly specify whether I want to use the software agents from the nightly build (i.e., by supplying an explicit bin path) or the default software agents that come with kappy (i.e., kasim = kappy.KappaStd()). In python 3.6 and 3.7, I have no problem. However, I recently upgraded to python3.8 -- with it, I can still supply my own bin path, but the default software agents that come with kappy do not work with python3.8.


On Wednesday, April 29, 2020 at 8:47:01 AM UTC-4, Walter Fontana wrote:
Apologies. I think I previously answered a question you did not ask…
(But I would like to turn my “answer” into a question: why does "make all" not make all?)

pip installation with python 3.7.2 worked for me.

w

On Apr 29, 2020, at 8:40 AM, Walter Fontana <walter...@gmail.com> wrote:

I’m using 3.7 and had a similar problem with kappy yesterday. (I’m at my first experience with kappy and can’t tell you how much I love undocumented academic software!) My problem was that when I compiled the Kappa binaries with "make all” I get the usual set of command line tools, but no software agents; when I compiled with “make agents” I get all the software agents but no command line tools (even without intervening "make clean”). Once I had the software agents, I supplied the path to the method that generates an instance, eg:

kasim=kappy.KappaStd("/Users/wf7/Walter/KappaTools/Tools/KaSim/bin”)

I presume you could also set an environment variable. 

One reason I’m experimenting with the python API in detail is to write documentation for the manual... In the meantime, peruse the comments in the code.

But maybe the experts can chime in.

w

On Apr 29, 2020, at 2:32 AM, Ryan Krueger <ryan...@umich.edu> wrote:

I recently upgraded to python 3.8 and kappy is no longer working -- it doesn't have the bin files. When I downgrade back to 3.6, the kappy installation from pip works.

--
You received this message because you are subscribed to the Google Groups "kappa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kappa...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "kappa-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kappa...@googlegroups.com.

Pierre Boutillier

unread,
Apr 29, 2020, 5:47:37 PM4/29/20
to kappa...@googlegroups.com

So,

Why `make agents` not part of `make all`? Because agents have more OCaml dependencies than the command line tools and in the early ages of the GUI/Agents, dependencies weren't free to install so we didn't impose to poeple "simply willing to have KaSim and KaSa the price of installing these extra libraries. Now that everybody has opam and knows more or less how to use it, we may reconsider this indeed.


Why kappy does not come with bundled binaries when you're using python 3.8? Because "binary wheels" are specific to a version of python and therefore you have to upload a wheel for each version of python. As python 3.8 is more recent than my last upload of wheels on pypi.org, I didn't (couldn't at that time) upload a binary wheel for 3.8 :-) I'll upload wheels for 3.8 asap (and actually I have to do a Kappy and Kappa 4.1, this is long overdue...)


Point about the lack of documentation is fear taken, you're absolutely right and I would even go further, the API is shitty. I mean, this is what it is as a low level API that was made for a reason but you want a more high level one that wraps it. Just to give an example : you would like to be able to call a method take_a_snapshot_now() that return a a snapshot of the current mixture not what you have to do for now by hand aka first calling fire_a_perturbation("$SNAPSHOT foobar") that generates one in the background and then call return_a_previously generated_snapshot(foobar.ka") ...

My problem is I've never been a python programmer, I never ever wrote anything serious in python, I know nothing about python ecosystem, I don't know the structure of APIs a python programmer expects, etc. So I (with help of others) made the work to bring Kappa capabilities to python raw and hoped that someone knowing this world would take over for there, do the wrappers, do the right sphinks incantation (or any better way of doing) to get a documentation out of the comments in the files enhanced with more, publish that where it should be, etc..   Each time someone gave me a tip I took it, this is why it is installable with pip, method have a documentation comment that ipython/jupyter can find&print but also why sometime you get the raw json just parsed back sometime you get a python object but with only half the method you would need sometime method takes a raw string as argumet sometime a fancy list of named arguments, ... I'm doing "my best" but always as a stranger :-/


Pierre B.

To unsubscribe from this group and stop receiving emails from it, send an email to kappa-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kappa-users/bf9e0d49-e258-4398-8bb9-5d219fb4c74d%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages