From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id uMBJFZDrxF8bOwAA0tVLHw (envelope-from ) for ; Mon, 30 Nov 2020 12:54:40 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id KCdAEZDrxF+rZQAA1q6Kng (envelope-from ) for ; Mon, 30 Nov 2020 12:54:40 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6A3CC940340 for ; Mon, 30 Nov 2020 12:54:39 +0000 (UTC) Received: from localhost ([::1]:37424 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kjihS-0000B0-AE for larch@yhetil.org; Mon, 30 Nov 2020 07:54:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54910) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kjig2-0007sR-3j for help-guix@gnu.org; Mon, 30 Nov 2020 07:53:11 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]:35438) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kjifz-0001lj-ST for help-guix@gnu.org; Mon, 30 Nov 2020 07:53:09 -0500 Received: by mail-wm1-x32e.google.com with SMTP id e25so6071060wme.0 for ; Mon, 30 Nov 2020 04:53:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=H+WVQvCSAEMk5qk1pp1MuuUXKvX/HUv2esTmAx7LR9M=; b=DBXq2Vwk6WuIBOvmGlQ8AHLcKddvZPvBS5OIr+FMP10AXnHOWJKDbHUeQ7RWv6sD0g 2yJFLHCxkcm9YIBsoOZ+6NHvtTSRn5tP71RDuuifoJbj6zcPf9z3+/34+rQrXGVomFEZ M/yCzK6VmT2Y4RdFdUFiao4gSiPWw3sf4nHeGMtGNAlCy16Byz5A8Uqwd114NCALwqth g9sqms9U7MuJVskfhrOCbFyGJUGeZh41u4kLjNA8DqsDCzE5oDZHU1e6HpWej2PaSoHu szSDaTMym0WKPFv/lzKlHL7BiJDajzFYi16h+AEcc0k8S+1hAb5kgVQEuvWkstOt4pu2 YkvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=H+WVQvCSAEMk5qk1pp1MuuUXKvX/HUv2esTmAx7LR9M=; b=C4J1tcq6jCizsNIiry8mpjlzZOV9ggBfQXZimIorJLt1M4Ixrn0Qj5TeCJ7ETkZMSz QWzLdRGzDZ5DgYLoV8HnSrpK6CKx7qyJpqAXA8QmYH6XfIxt4MIra3FHA8gCpTbHDz8B afFSdqV104KwGIAKJAI9vERLkiIedHKCgonhjcEAJdB4mDOZxNF7jVDU4HhKbuekfkvD kTTqMIN1yxdoo19yFF/hZg+hnavVscEdOgYcJ5G/sJNJw5CY2du6kQvejOfG6+HaRK2o AY1HnoO0mbN71wAP7/Bt2QIcCAxYHu62JcaKjXuNeLODAeZZDvg0TMNZP2ZA7CN/cfSO RKnQ== X-Gm-Message-State: AOAM532iePknpEb0Sxklyhe6TB3+4nC1iCnkMqmOB2Cng+g7osNj0aii 6XbFTl/kimNRUMQziUNsa8iB0pJngekztA== X-Google-Smtp-Source: ABdhPJxNVJ7AbDp+krgfzSC34T2zlW9Ot8+YpQHsO+3cT9MYZdzqSwiKJKQzLnayY3y0pvuAgAjN9A== X-Received: by 2002:a1c:234d:: with SMTP id j74mr6618184wmj.18.1606740785152; Mon, 30 Nov 2020 04:53:05 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id q12sm24481525wmc.45.2020.11.30.04.53.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 30 Nov 2020 04:53:04 -0800 (PST) From: zimoun To: branjam4@gmail.com, help-guix@gnu.org Subject: Re: Reproducing a Python project environment (using guix inferiors) In-Reply-To: <87czzw6hid.fsf@branjam-ASM100.i-did-not-set--mail-host-address--so-tickle-me> References: <87czzw6hid.fsf@branjam-ASM100.i-did-not-set--mail-host-address--so-tickle-me> Date: Mon, 30 Nov 2020 13:51:48 +0100 Message-ID: <86sg8rvwgr.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=zimon.toutoune@gmail.com; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -3.42 X-Spam-Score: -3.42 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=DBXq2Vwk; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Scanner: ns3122888.ip-94-23-21.eu X-TUID: LbEsqUUmdcCg Hi, On Sat, 28 Nov 2020 at 18:09, branjam4@gmail.com wrote: > 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. Cool! Thank you for your feedback. > 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 Usually, this is done via the option =E2=80=9C--load-path=E2=80=9D or Custo= m Channels. > + wrote inferiors for older versions of packages that were in guix. You might be interested by this Channel: > 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]. I am not sure to understand what you are naming =E2=80=9Cinferior=E2=80=9D = here. From my experience, one simple way to start is: guix time-machine --commit=3D \ -- build -L where is an old Guix commit providing bunch of dependencies used by of interest defined in the folder . A channels.scm file with the option =E2=80=99--channels/-C=E2=80=99 seems e= ven better. > But how would I know what a "good" guix inferior commit is for all of > these packages? Let=E2=80=99s fix ideas and let=E2=80=99s say you are interested by the pac= kage python-foo at the version 1.2.3. This package depends on python-bar at version x.y.z available at commit range 12345-67890 and on python-baz at version m.n available at commit range ABCDE-FGHIJ. Then there is no commit where python-bar *and* python-baz are both at the correct versions (resp. x.y.z and m.n.). In other words, the 2 commit ranges 12345-67890 and ABCDE-FGHIJ do not overlap. Is it your use case? BTW, a tool to find the range of commit where one specific version is available is the Data Service. Give a look at: > 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? Being on a foreign distro does not change. The main difference between between foreign and native is only about services, not packages. > 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! Cool! > [1] Complex Network Analysis Using Python, by Dmitry Zinoviev I will try to give a look if my library has this reference. > [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. I have tried to write a script for my personal needs running via =E2=80=9Cg= uix repl=E2=80=9D. It fetches the JSON file from the Data Service, which give = the commit range for the required version per package. Then I have not finished it (yet) but the idea was to be able to spot out the commit providing all the packages at the required versions, i.e., the intersection. Pieces of the necessary material is in guix/git.scm. > [3] > #+begin_example scheme > In current input: > 12:3 12 (_) > In guix/store.scm: [...] > 619:8 4 (_ #(#(#(#) "/gnu=E2=80=A6" = =E2=80=A6) =E2=80=A6)) > 626:19 3 (_ #(#(#(#) "/gnu=E2=80=A6" = =E2=80=A6) =E2=80=A6)) > 155:9 2 (_ #(#(#(#) "/gnu=E2=80=A6" = =E2=80=A6) =E2=80=A6)) > 223:20 1 (proc #(#(#(#) "/=E2=80=A6" = =E2=80=A6) =E2=80=A6)) > In unknown file: > 0 (%resolve-variable (7 . %guix-register-program) #) > #+end_example What did you run? The command and the file(s)? > [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 | What do you mean by =E2=80=9Cbad=E2=80=9D? Does it mean: 1. the package does not build 2. the package is failing 3. else ? All the best, simon