Dear all,
In the course of trying out poetry for data science projects on
guix, I am running into the problem of some poetry-installed
packages not finding their desired libraries. (See example below
with pandas.) I suppose this is because poetry will download
pre-built binary wheels which have pre-coded library paths.
If this is the problem, would there be any clean way to wrap those
binary wheels, or patch poetry-on-guix to mandatorily rebuild
binaries? (Would that make sense?)
(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.)
(I am also aware of guix-jupyter, but that is another topic I'd
like to return to later as it needs some more bugsquashing for
usability.)
Happy hacking!
Sébastien
#+BEGIN_SRC
$ poetry new poetry-test
Created package poetry_test in poetry-test
$ cd poetry-test/
$ poetry add pandas
Creating virtualenv poetry-test-vOWX4_Vr-py3.8 in
/home/sl/.cache/pypoetry/virtualenvs
Using version ^1.2.3 for pandas
Updating dependencies
Resolving dependencies... (0.2s)
Writing lock file
Package operations: 4 installs, 9 updates, 0 removals
• Updating pyparsing (2.4.6
/home/sl/.guix-profile/lib/python3.8/site-packages -> 2.4.7)
• Updating six (1.14.0
/home/sl/.guix-profile/lib/python3.8/site-packages -> 1.15.0)
• Updating attrs (19.3.0
/home/sl/.guix-profile/lib/python3.8/site-packages -> 20.3.0)
• Updating more-itertools (8.2.0
/home/sl/.guix-profile/lib/python3.8/site-packages -> 8.7.0)
• Updating numpy (1.17.3
/home/sl/.guix-profile/lib/python3.8/site-packages -> 1.20.1)
• Updating packaging (20.0
/home/sl/.guix-profile/lib/python3.8/site-packages -> 20.9)
• Installing pluggy (0.13.1)
• Installing py (1.10.0)
• Updating python-dateutil (2.8.1
/home/sl/.guix-profile/lib/python3.8/site-packages -> 2.8.1)
• Updating pytz (2020.4
/home/sl/.guix-profile/lib/python3.8/site-packages -> 2021.1)
• Updating wcwidth (0.1.8
/home/sl/.guix-profile/lib/python3.8/site-packages -> 0.2.5)
• Installing pandas (1.2.3)
• Installing pytest (5.4.3)
$ poetry run which python
/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/bin/python
$ poetry run python
Python 3.8.2 (default, Jan 1 1970, 00:00:01)
[GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more
information.
import pandas
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/__init__.py",
line 51, in <module>
from pandas.core.api import (
File
"/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/core/api.py",
line 31, in <module>
from pandas.core.groupby import Grouper, NamedAgg
File
"/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/core/groupby/__init__.py",
line 1, in <module>
from pandas.core.groupby.generic import DataFrameGroupBy,
NamedAgg, SeriesGroupBy
File
"/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/core/groupby/generic.py",
line 65, in <module>
from pandas.core.frame import DataFrame
File
"/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/core/frame.py",
line 119, in <module>
from pandas.core import algorithms, common as com, generic,
nanops, ops
File
"/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/core/generic.py",
line 111, in <module>
from pandas.core.window import Expanding,
ExponentialMovingWindow, Rolling, Window
File
"/home/sl/.cache/pypoetry/virtualenvs/poetry-test-vOWX4_Vr-py3.8/lib/python3.8/site-packages/pandas/core/window/__init__.py",
line 1, in <module>
from pandas.core.window.ewm import ( # noqa:F401
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
#+END_SRC