From: branjam4@gmail.com
To: help-guix@gnu.org
Subject: Reproducing a Python project environment (using guix inferiors)
Date: Sat, 28 Nov 2020 18:09:30 -0800 [thread overview]
Message-ID: <87czzw6hid.fsf@branjam-ASM100.i-did-not-set--mail-host-address--so-tickle-me> (raw)
Hello all!
Some time before I started using guix I worked through Python examples
within this book[1] for school. There were some differences in the
packages I installed and the listed requirements for the book (pseudo
manifest at [2]) which made things difficult for me as a (then) new
programmer.
Believing guix could more faithfully/cleanly reproduce the environment
from the book than my former approach using pip, I:
+ imported/wrote definitions for packages not in guix
+ wrote inferiors for older versions of packages that were in guix.
I'm not sure what the rhyme or reason is, but most of my inferior
attempts failed with this backtrace[3]. A couple were successful, as you
can see in this table[4].
Usually I've had good luck consulting the manual, mailing lists, and IRC
logs, but I'm at a bit of a loss this time since the nature of others'
inferior issues seems different from mine (and were probably fixed).
I've tried with the following (non-inferior) commits on a foreign
distro:
+ 71507435225f10d8d944ba183cbcc77ef953e0e5
+ f816deb9055669deaca59ac7652943adf7f11bb1
+ 0d7c95445c (and some commits shortly after this one)
Since the results consistently match[4], I supposed the issue might be
with the commits I've selected for the inferiors. But at this point I
thought I should ask for help in case I'm too far off.
From what I can gather, inferiors are the recommended way to declare
packages defined in older revisions of guix.
But how would I know what a "good" guix inferior commit is for all of
these packages?
Would using the definitions instead of asking guix to reproduce
five different worlds for one package each be an anti-pattern?
Is my issue related to being on a foreign distro, thus Guix System users
wouldn't know much about this problem?
Even though I'm mentioning this specific frustration, I enjoyed the
learning process getting to this point and want to express my
appreciation. Despite interacting with clojure and emacs lisp for at
least a year, guix/guile finally got me to use quoting, let, and lambda
in a non-trivial way. Thus the otherwise tedious work of generating five
different channel/inferior definitions as per the example in the manual
was actually a breeze!
Thanks for your help and hard work,
--Brandon
[1] Complex Network Analysis Using Python, by Dmitry Zinoviev
[2] For some of the versioned packages, I commented the newest commit
prior to guix bumping that package, which I would use for an inferior.
#+BEGIN_SRC scheme
(specifications->manifest ;inferior commit notes
'("python" ; not trying to build this from scratch.
"python-matplotlib@2.0.2" ;7e06086522
"python-nltk" ;need 3.2.5
"python-pandas@0.22.0" ;ce2cfcabfc
;"python-wikipedia@1.4.0" need to guix import
;"python-toposort@1.5" need to guix import
"python-networkx@2.1" ;269f100330
;"python-community@0.10" need to guix import
"python-numpy@1.13.3" ;4d6ed794dd
"python-pygraphviz" ;want 1.3 but only 1.5 available
;;may need graphviz-dev as well
"python-scipy@1.0.1" ;02ddafef55
;"python-louvain@0.14" need to guix import
;need to install the author's custom modules))
#+END_SRC
I used the above as a guide while doing the actual imports/inferior
work.
[3]
#+begin_example scheme
In current input:
12:3 12 (_)
In guix/store.scm:
623:10 11 (call-with-store _)
1803:24 10 (run-with-store #<store-connection 256.99 129ec60> _ # _ …)
In guix/inferior.scm:
681:12 9 (_ _)
In guix/channels.scm:
527:2 8 (_ _)
485:2 7 (_ _)
In ./guix/monads.scm:
482:9 6 (_ _)
In guix/store.scm:
1673:13 5 (_ _)
In ice-9/eval.scm:
619:8 4 (_ #(#(#(#<directory (build-self) 1842aa0>) "/gnu…" …) …))
626:19 3 (_ #(#(#(#<directory (build-self) 1842aa0>) "/gnu…" …) …))
155:9 2 (_ #(#(#(#<directory (build-self) 1842aa0>) "/gnu…" …) …))
223:20 1 (proc #(#(#(#<directory (build-self) 1842aa0>) "/…" …) …))
In unknown file:
0 (%resolve-variable (7 . %guix-register-program) #<direc…>)
#+end_example
[4]
| package of interest | guix commit | status |
|---------------------+--------------+--------|
| python-matplotlib | "7e06086522" | bad |
| python-pandas | ce2cfcabfc | bad |
| python-networkx | 269f100330 | good |
| python-numpy | 4d6ed794dd | bad |
| python-scipy | 02ddafef55 | good |
next reply other threads:[~2020-11-29 13:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-29 2:09 branjam4 [this message]
2020-11-30 12:51 ` Reproducing a Python project environment (using guix inferiors) zimoun
2020-11-30 22:39 ` Brandon Ellington
2020-12-01 11:50 ` zimoun
2020-12-01 20:35 ` Brandon Ellington
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87czzw6hid.fsf@branjam-ASM100.i-did-not-set--mail-host-address--so-tickle-me \
--to=branjam4@gmail.com \
--cc=help-guix@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).