From: Phil <phil@beadling.co.uk>
To: help-guix@gnu.org
Subject: Re: Python, poetry, and pandas
Date: Wed, 10 Mar 2021 10:02:03 +0000 [thread overview]
Message-ID: <85a6rbmin8.fsf@beadling.co.uk> (raw)
In-Reply-To: <87pn0731c1.fsf@eauchat.org>
Hi Sébastien,
Sébastien Lerique writes:
> Dear all,
>
> (I am aware that python-pandas is packaged for guix, but some packages
> I will need down the road might not be; this project is also in
> collaboration with non guix users, so I am looking for a workflow
> which will work for them too.)
>
Under the covers Poetry is just using regular Python virtualenvs I think.
These don't work well with Guix for a number of reasons - but in my
previous attempts to use them I found that Guix's use of PYTHONPATH
meant that virtualenvs where never isolated from packages installed by
Guix.
Guix offers pretty much everything that virtualenvs offers, but it does
things a little differently - you'll need to look at environments,
profiles, manifests, and use of a guix.scm to recreate (IMHO) a better
experience in the end.
When I started using Guix I went to some lengths to harmonize
virtualenvs and Guix - and others have made more substantial efforts
than I did - but you end up creating as many problems as you fix:
https://lists.gnu.org/archive/html/help-guix/2020-11/msg00237.html
If you search the mail archive a couple of other people have asked
similar questions to do with poetry, pyenv, pip, etc - they're all
interesting reading and easy to grep with those keywords:
https://lists.gnu.org/archive/html/help-guix/
The advice I was given at the time was don't mix package managers, and
in hindsight I'm glad repackaged what I needed under Guix.
I've packaged quite a few python libraries now, and most are pretty
trivial to do - if they are in PyPi you can just use this:
guix import pypi <package_name>
If you need a later version than Guix provides (eg pandas), my advice is
to use the ability to "inherit" the current definition in Guix and tweak
the version. For Pandas I did this for a more recent version I needed
and all I had to do was disable 2 unit tests (which failed for a
non-Guix reason).
Apologies - not exactly the answer you want (I have a stab at that
below), but it's worth considering moving to Guix packaging exclusively
to keep your life simple.
> File
> "/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/core/window/ewm.py",
> line 9, in <module>
> import pandas._libs.window.aggregations as window_aggregations
> ImportError: libstdc++.so.6: cannot open shared object file: No such
> file or directory
If it's only missing a reference to the underlying C++ library you could
install this library using Guix, or if you're using a foreign distro point to
the non-Guix version under /usr/lib which, at a guess, Poetry may have
picked up - but this is going to cause you more trouble down the line
than repackaging in Guix in my experience.
next prev parent reply other threads:[~2021-03-10 10:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 7:38 Python, poetry, and pandas Sébastien Lerique
2021-03-10 10:02 ` Phil [this message]
2021-03-12 2:14 ` Sébastien Lerique
2021-03-13 11:19 ` Phil
2021-03-10 13:34 ` zimoun
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=85a6rbmin8.fsf@beadling.co.uk \
--to=phil@beadling.co.uk \
--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).