!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

331 Members
https://github.com/nix-community/poetry2nix62 Servers

Load older messages


SenderMessageTime
29 Jan 2022
@rolandco:matrix.orgRoland CoeurjolyHi beautiful people! I'm trying get a shell with graphtage and wildq. No problem with the latter, but graphtage fails. >>> from graphtage import json Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/graphtage/__init__.py”, line 1, in <module> from . import graphtage File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/graphtage/graphtage.py”, line 11, in <module> from .multiset import MultiSetEdit File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/graphtage/multiset.py”, line 12, in <module> from .matching import WeightedBipartiteMatcher File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/graphtage/matching.py”, line 44, in <module> from scipy.optimize import linear_sum_assignment File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/optimize/__init__.py”, line 413, in <module> from ._linprog import linprog, linprog_verbose_callback File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/optimize/_linprog.py”, line 23, in <module> from ._linprog_ip import _linprog_ip File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/optimize/_linprog_ip.py”, line 27, in <module> from ._linprog_util import _postsolve File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/optimize/_linprog_util.py”, line 9, in <module> from scipy.optimize._remove_redundancy import ( File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/optimize/_remove_redundancy.py”, line 9, in <module> from scipy.linalg.interpolative import interp_decomp File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/linalg/interpolative.py”, line 385, in <module> import scipy.linalg._interpolative_backend as backend File “/nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/linalg/_interpolative_backend.py”, line 34, in <module> import scipy.linalg._interpolative as _id ImportError: /nix/store/x99l21wg669djr6a77sjzwga06s9zxmk-python3-3.9.9-env/lib/python3.9/site-packages/scipy/linalg/_interpolative.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZGVbN2v_cos It seems to be a problem with scipy. Looking around it seems to be solved by compiling with -lmvec, with provides support for mathematical vectors in libc16:23:47
@rolandco:matrix.orgRoland CoeurjolyI have tried putting an override for scipy with lmvec, to no avail16:24:40
@mou_bugtracker:matrix.orgmoumaybe you could provide you expression? it will be much easier if there will be ability to experiment and run localy16:26:55
@mou_bugtracker:matrix.orgmou * maybe you could provide your expression? it will be much easier if there will be ability to experiment and run localy16:28:57
@rolandco:matrix.orgRoland Coeurjoly
In reply to @mou_bugtracker:matrix.org
maybe you could provide your expression? it will be much easier if there will be ability to experiment and run localy

{ description = “graphtage”;

inputs.nixpkgs.url = “github:NixOS/nixpkgs/d9e21f284317f85b3476c0043f4efea87a226c3a”;

outputs = { self, nixpkgs }: let pkgs = nixpkgs.legacyPackages.x86_64-linux; myPoetryEnv = pkgs.poetry2nix.mkPoetryEnv { pyproject = ./pyproject.toml; poetrylock = ./poetry.lock; }; in { devShell.x86_64-linux = myPoetryEnv; }; }

This is the full content of the flake

16:50:05
@rolandco:matrix.orgRoland CoeurjolyTo reproduce, nix develop; graphtage --help16:50:34
@mou_bugtracker:matrix.orgmouSome wierd quotes (16:51:46
@mou_bugtracker:matrix.orgmou
In reply to @rolandco:matrix.org
To reproduce, nix develop; graphtage --help
pyproject.toml and poetry.lock needed too
16:54:24
@mou_bugtracker:matrix.orgmouor just pyproject.toml16:54:59
@rolandco:matrix.orgRoland Coeurjoly
In reply to @mou_bugtracker:matrix.org
or just pyproject.toml

[tool.poetry] name = “graphtage-tool” version = “0.1.0” description = “” authors = [“Roland Coeurjoly rolandcoeurjoly@gmail.com”]

[tool.poetry.dependencies] python = “>=3.9,<3.11” graphtage = “^0.2.5” wildq = “^1.1.10”

[tool.poetry.dev-dependencies]

[build-system] requires = [“poetry-core>=1.0.0”] build-backend = “poetry.core.masonry.api”

17:00:06
@rolandco:matrix.orgRoland CoeurjolySorry17:00:34
@rolandco:matrix.orgRoland CoeurjolyHow can you reproduce without poetry.lock? Nix complaints without it17:01:26
@rolandco:matrix.orgRoland Coeurjolyhttps://github.com/RCoeurjoly/nix_graphtage17:11:45
@rolandco:matrix.orgRoland Coeurjoly mou: you can find the repo above 17:12:17
@mou_bugtracker:matrix.orgmouthanks17:12:36
@mou_bugtracker:matrix.orgmouit take time to build17:12:44
@rolandco:matrix.orgRoland CoeurjolyThe package graphtage is in nixpkgs, and I can create a shell with it easily18:52:16
@rolandco:matrix.orgRoland CoeurjolyBut wildq is not in nixpkgs18:52:29
@rolandco:matrix.orgRoland CoeurjolyIs there a way to create a shell with python modules from nixpkgs and also some installed with poetry?18:54:10
@mou_bugtracker:matrix.orgmouunfortunately my time is over for today. I was not able to figure out cause of problem. But i think cause lies in missing native build dependencies like gfortran and similar. Here is definition for scypi in nixpkgs https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/python-modules/scipy/default.nix And 19:36:21
@mou_bugtracker:matrix.orgmouConsider use poetry2nix not from nixpkgs, but latest version from git. because it has pretty haevy override for scipy https://github.com/nix-community/poetry2nix/blob/master/overrides/default.nix#L167119:39:18
@mou_bugtracker:matrix.orgmou

i take standard template for poetry2nix and tried to build. ended up with cythonization fail ((

Processing scipy/optimize/_group_columns.pyx
  Processing scipy/interpolate/interpnd.pyx
  Processing scipy/optimize/_highs/cython/src/_highs_wrapper.pyx
  Processing scipy/optimize/_highs/cython/src/_highs_constants.pyx
  Traceback (most recent call last):
    File "/build/scipy-1.7.3/tools/cythonize.py", line 324, in <module>
      main()
    File "/build/scipy-1.7.3/tools/cythonize.py", line 320, in main
      find_process_files(root_dir)
    File "/build/scipy-1.7.3/tools/cythonize.py", line 309, in find_process_files
  Processing scipy/optimize/_trlib/_trlib.pyx
      for result in pool.imap_unordered(lambda args: process(*args), jobs):
    File "/nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3-3.9.9/lib/python3.9/multiprocessing/pool.py", line 870, in next
      raise value
    File "/nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3-3.9.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker
      result = (True, func(*args, **kwds))
    File "/build/scipy-1.7.3/tools/cythonize.py", line 309, in <lambda>
      for result in pool.imap_unordered(lambda args: process(*args), jobs):
    File "/build/scipy-1.7.3/tools/cythonize.py", line 243, in process
      processor_function(fromfile, tofile, cwd=path)
    File "/build/scipy-1.7.3/tools/cythonize.py", line 80, in process_pyx
      min_required_version, max_required_version = line.split(split_on)
  ValueError: too many values to unpack (expected 2)
  Processing scipy/optimize/cython_optimize/_zeros.pyx.in
  Cythonizing sources
19:54:23
@mou_bugtracker:matrix.orgmou *

i took standard template for poetry2nix and tried to build. ended up with cythonization fail ((

Processing scipy/optimize/_group_columns.pyx
  Processing scipy/interpolate/interpnd.pyx
  Processing scipy/optimize/_highs/cython/src/_highs_wrapper.pyx
  Processing scipy/optimize/_highs/cython/src/_highs_constants.pyx
  Traceback (most recent call last):
    File "/build/scipy-1.7.3/tools/cythonize.py", line 324, in <module>
      main()
    File "/build/scipy-1.7.3/tools/cythonize.py", line 320, in main
      find_process_files(root_dir)
    File "/build/scipy-1.7.3/tools/cythonize.py", line 309, in find_process_files
  Processing scipy/optimize/_trlib/_trlib.pyx
      for result in pool.imap_unordered(lambda args: process(*args), jobs):
    File "/nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3-3.9.9/lib/python3.9/multiprocessing/pool.py", line 870, in next
      raise value
    File "/nix/store/i6vabb4div9iy6lsl642d86k1q8riasn-python3-3.9.9/lib/python3.9/multiprocessing/pool.py", line 125, in worker
      result = (True, func(*args, **kwds))
    File "/build/scipy-1.7.3/tools/cythonize.py", line 309, in <lambda>
      for result in pool.imap_unordered(lambda args: process(*args), jobs):
    File "/build/scipy-1.7.3/tools/cythonize.py", line 243, in process
      processor_function(fromfile, tofile, cwd=path)
    File "/build/scipy-1.7.3/tools/cythonize.py", line 80, in process_pyx
      min_required_version, max_required_version = line.split(split_on)
  ValueError: too many values to unpack (expected 2)
  Processing scipy/optimize/cython_optimize/_zeros.pyx.in
  Cythonizing sources
21:53:16
3 Feb 2022
@jyamad:cofree.coffeejyamad joined the room.20:43:40
@lewo:matrix.orglewo joined the room.21:47:31
8 Feb 2022
@graf_blutwurst:matrix.orgDominic Egger joined the room.05:38:54
@graf_blutwurst:matrix.orgDominic EggerGood Morning everyone. I am currently working on a little showcase workbench/projects for python based friends that don't know nix. They work fairly extensively with numpy and pandas so i tried adding those to poetry and so also to my environment. but it seems that that causes pandas and numpy to fully recompile them locally. i also tried pinning the versions to ones specifically available on nix. does anyone have some insight into this?05:41:33
@adis:blad.isadisbladis
In reply to @graf_blutwurst:matrix.org
Good Morning everyone. I am currently working on a little showcase workbench/projects for python based friends that don't know nix. They work fairly extensively with numpy and pandas so i tried adding those to poetry and so also to my environment. but it seems that that causes pandas and numpy to fully recompile them locally. i also tried pinning the versions to ones specifically available on nix. does anyone have some insight into this?
That's fully expected. Even if you would somehow pin the exact same versions that are available in nixpkgs the build closure and resulting derivations are not exactly the same.
05:52:31
@graf_blutwurst:matrix.orgDominic Eggerhm it seems i have to better understand build closures better. i assumed a dependency like that would be "low" enough that it could be picked up from the store/nixpkgs. thanks though! how do people deal with the long resulting build times? push the result from mkPoetryEnv to a binary cache?06:02:07
@adis:blad.isadisbladis
In reply to @graf_blutwurst:matrix.org
hm it seems i have to better understand build closures better. i assumed a dependency like that would be "low" enough that it could be picked up from the store/nixpkgs. thanks though! how do people deal with the long resulting build times? push the result from mkPoetryEnv to a binary cache?
Typically, yes.
06:02:46

Show newer messages


Back to Room ListRoom Version: 6