!rWxyQqNqMUDLECdsIf:blad.is

Poetry2nix

298 Members
https://github.com/nix-community/poetry2nix | Poetry2nix is unmaintained https://github.com/nix-community/poetry2nix/issues/186553 Servers

Load older messages


SenderMessageTime
13 Mar 2024
@dantefromhell:matrix.org@dantefromhell:matrix.org joined the room.15:00:37
@dantefromhell:matrix.org@dantefromhell:matrix.orgI'm using `poetry2nix` inside a flake and it duplicates my `systems` input via `inputs.flake-utils.systems`. since `poetry2nix` already has `inputs.systems` I wonder if it's intentional that `flake-utils` is not following this input?15:05:22
14 Mar 2024
@federicodschonborn:matrix.org@federicodschonborn:matrix.org left the room.02:04:48
@vbear:matrix.orgVebjørn Halvorsen joined the room.12:31:31
@vbear:matrix.orgVebjørn HalvorsenIm getting this error when trying to install tensorflow: 🤔 974| (old.buildInputs or [ ]) 975| ++ [ pkgs.hdf5 self.pkg-config ] | ^ 976| ++ lib.optional mpiSupport mpi Did you mean pkgconfig?12:32:31
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.18:45:09
@tcarls:matrix.orgCharles Duffy How does one set overlays &c when using mkPoetryScriptsPackage? I tried setting python = myPoetryEnv, but that's not actually putting the dependencies in that poetryEnv (which does have overrides &c defined) in the PYTHONPATH. 20:40:19
15 Mar 2024
@truh:matrix.orgtruh
In reply to @vbear:matrix.org
Im getting this error when trying to install tensorflow: 🤔

974| (old.buildInputs or [ ])
975| ++ [ pkgs.hdf5 self.pkg-config ]
| ^
976| ++ lib.optional mpiSupport mpi
Did you mean pkgconfig?
maybe you need self.pkgconfig instead of self.pkg-config
11:05:14
@grahamc:nixos.org@grahamc:nixos.org joined the room.23:50:24
17 Mar 2024
@sankaratupi:matrix.orgFelipe Marcelino joined the room.17:59:18
18 Mar 2024
@truh:matrix.orgtruh

I'm getting ModuleNotFoundError: No module named 'poetry' for one of my dependencies even though I'm adding poetry-core to the buildInputs. Any suggestions what I could try to get it to build, short of changing the build system of the dependency?

The dependency in question is maphash and I'm its maintainer. It's possible that I didn't package it correctly but it works fine without poetry2nix and it's pretty basic as far as python packages go.

09:02:06
@truh:matrix.orgtruh *

I'm getting ModuleNotFoundError: No module named 'poetry' for one of my dependencies even though I'm adding poetry-core to the buildInputs. Any suggestions what I could try to get it to build, short of changing the build system of the dependency?

The dependency in question is maphash and I'm its maintainer. It's possible that I didn't package it correctly but it works fine without poetry2nix and it's pretty basic as far as python packages go.

edit: Can't reproduce this in a repo without other dependencies, will have to give this some more thought.

09:22:39
@truh:matrix.orgtruh

I had an error in my overrides, in addition to maphash = super.maphash.overridePythonAttrs .... I had some-other-package = super.maphash.overridePythonAttrs ..... I guess this lead to the overwritten maphash not getting evaluated properly.

I found this out by checking the maphash derivation with nix derivation show </nix/store ** maphash.drv> and not finding poetry-core in the buildInputs.

10:41:10
@ubbabeck:matrix.orgubbabeck set a profile picture.19:13:34
19 Mar 2024
@mjolnir:nixos.orgNixOS Moderation Botchanged room power levels.00:30:30
@latenighticecream:matrix.orglatenighticecream joined the room.15:14:39
@latenighticecream:matrix.orglatenighticecream Hey, I have a problem with a specific pypi module not working. It's mitsuba: https://pypi.org/project/mitsuba/. I have a simple pyproject.toml only including this and python 3.11. In a flake I am simply using mkPoetryEnv as a package for a devshell, like this:
devShells.default = pkgs.mkShell {

  packages = [
    (poetry2nix.mkPoetryEnv { 
      projectDir = ./src/code/notebooks;
        python = pkgs.python311;
    })
  ];

  shellHook = ''
    echo "hello :)"
  '';
};
However, the mitsuba package produces this error:
error: builder for '/nix/store/8rhlcg4d3xy67a7jcmf52bjv48wiklg6-python3.11-mitsuba-3.5.0.drv' failed with exit code 1;
       last 10 log lines:
       > error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
       > error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
       > error: auto-patchelf could not satisfy dependency libdrjit-autodiff.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > auto-patchelf failed to find all the required dependencies.
       > Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
15:26:40
@latenighticecream:matrix.orglatenighticecream Hey, I have a problem with a specific pypi module not working. It's mitsuba: https://pypi.org/project/mitsuba/. I have a simple pyproject.toml only including this and python 3.11. In a flake I am simply using mkPoetryEnv as a package for a devshell, like this:
devShells.default = pkgs.mkShell {

  packages = [
    (poetry2nix.mkPoetryEnv { 
      projectDir = ./src/code/notebooks;
        python = pkgs.python311;
    })
  ];

  shellHook = ''
    echo "hello :)"
  '';
};
However, the mitsuba package produces this error:
error: builder for '/nix/store/8rhlcg4d3xy67a7jcmf52bjv48wiklg6-python3.11-mitsuba-3.5.0.drv' failed with exit code 1;
       last 10 log lines:
       > error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
       > error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
       > error: auto-patchelf could not satisfy dependency libdrjit-autodiff.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > auto-patchelf failed to find all the required dependencies.
       > Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
...
Its referring to libdrjit-core.so, etc which seem to be produced by mitsuba itself (?). I have absolutely no idea what to do from here on
15:28:12
@latenighticecream:matrix.orglatenighticecream set a profile picture.15:30:26
@angryant:envs.netAngryAnt
In reply to @latenighticecream:matrix.org
Hey, I have a problem with a specific pypi module not working. It's mitsuba: https://pypi.org/project/mitsuba/. I have a simple pyproject.toml only including this and python 3.11. In a flake I am simply using mkPoetryEnv as a package for a devshell, like this:
devShells.default = pkgs.mkShell {

  packages = [
    (poetry2nix.mkPoetryEnv { 
      projectDir = ./src/code/notebooks;
        python = pkgs.python311;
    })
  ];

  shellHook = ''
    echo "hello :)"
  '';
};
However, the mitsuba package produces this error:
error: builder for '/nix/store/8rhlcg4d3xy67a7jcmf52bjv48wiklg6-python3.11-mitsuba-3.5.0.drv' failed with exit code 1;
       last 10 log lines:
       > error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
       > error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/volpath.so
       > error: auto-patchelf could not satisfy dependency libdrjit-autodiff.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > error: auto-patchelf could not satisfy dependency libdrjit-core.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > error: auto-patchelf could not satisfy dependency libnanothread.so wanted by /nix/store/iyfq6jqyz8lznqkvb1y59r3ms2bnilna-python3.11-mitsuba-3.5.0/lib/python3.11/site-packages/mitsuba/plugins/diffuse.so
       > auto-patchelf failed to find all the required dependencies.
       > Add the missing dependencies to --libs or use `--ignore-missing="foo.so.1 bar.so etc.so"`.
...
Its referring to libdrjit-core.so, etc which seem to be produced by mitsuba itself (?). I have absolutely no idea what to do from here on
You need to supply those libraries into the poetry context via overrides. Here's an example of doing that with some cuda & tensorflow packages: https://gist.github.com/AngryAnt/3386008247b5c984238f4ec33361ac8d
16:49:57
@angryant:envs.netAngryAntIf those libraries are not already packaged, you need to fetch them from where-ever mitsuba makes them available and pass that into your overrides.16:51:35
@latenighticecream:matrix.orglatenighticecreamthank you for your answer! i will try it tomorrow17:49:14
@eyalch:matrix.orgeyalch joined the room.18:00:03
20 Mar 2024
@latenighticecream:matrix.orglatenighticecream @AngryAnt So i found out that those libraries come from a different python package (https://pypi.org/project/drjit/) which is not available as a nix package. Does this mean I need to create a derivation for this (e.g. using buildPythonPackage) and then put this into the override or can I somehow refer to it using poetry2nix directly? 18:14:09
@latenighticecream:matrix.orglatenighticecream I tried doing it like this:
drjit = my-python.pkgs.buildPythonPackage {
  pname = "drjit";
  version = "0.4.4";
  format = "wheel";
  src = pkgs.fetchurl {
    url = "https://files.pythonhosted.org/packages/[...].whl";
    hash = "[...]";
  };
};
19:16:10
@latenighticecream:matrix.orglatenighticecream I tried doing it like this:
drjit = my-python.pkgs.buildPythonPackage {
  pname = "drjit";
  version = "0.4.4";
  format = "wheel";
  src = pkgs.fetchurl {
    url = "https://files.pythonhosted.org/packages/[...].whl";
    hash = "[...]";
  };
};
and then this in the overrides:
overrides = poetry2nix.overrides.withDefaults (final: prev: {
  mitsuba = prev.mitsuba.overridePythonAttrs (old: {
    buildInputs = (old.buildInputs or [ ]) ++ [ drjit ];
  });
});
But it still cannot find it and outputs the same error as before
19:18:17
@vengmark2:matrix.org@vengmark2:matrix.org
In reply to @latenighticecream:matrix.org
@AngryAnt So i found out that those libraries come from a different python package (https://pypi.org/project/drjit/) which is not available as a nix package. Does this mean I need to create a derivation for this (e.g. using buildPythonPackage) and then put this into the override or can I somehow refer to it using poetry2nix directly?
poetry2nix processes your poetry.lock and pyproject.toml to try to auto-build all the packages, without reaching into nixpkgs. So you shouldn't have to package things yourself.
20:31:56
@charles:computer.surgeryCharles joined the room.23:12:47
@charles:computer.surgeryCharles
In reply to @djacu:matrix.org

Hi everyone

I am having trouble with a minimal pyproject.toml file that only includes python 3.9 and pandas 2.2.0. Charles Duffy it looks related to your issue with overriding Cython.

Looking through the error longs, it apperas that it was using an old version of cython (v 0.29.36). I tried overriding it as per the edgecases doc in the poetry2nix repo but it didn't fix it.

Repo with the minimal environment -> https://github.com/djacu/poetry2nix-pandas-broken

my flake vvv. i am trying to use the devShell named pandas

{
  description = "Test poetry2nix env to investigate why pandas 2.2.0 won't build.";

  inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  inputs.flake-utils.url = "github:numtide/flake-utils";
  inputs.poetry2nix.url = "github:nix-community/poetry2nix";
  inputs.poetry2nix.inputs.flake-utils.follows = "flake-utils";
  inputs.poetry2nix.inputs.nixpkgs.follows = "nixpkgs";

  outputs = {
    self,
    nixpkgs,
    flake-utils,
    poetry2nix,
  }:
    flake-utils.lib.eachDefaultSystem (
      system: let
        pkgs = nixpkgs.legacyPackages.${system};

        inherit
          (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;})
          mkPoetryEnv
          defaultPoetryOverrides
          ;

        python = pkgs.python39;
        pandas-env = mkPoetryEnv {
          projectDir = ./.;
          inherit python;
          #preferWheels = true;
          overrides =
            defaultPoetryOverrides.extend
            (final: prev: {
              pandas =
                prev.pandas.overridePythonAttrs
                (
                  old: {
                    buildInputs =
                      (old.buildInputs or [])
                      ++ [
                        prev.cython_3
                      ];
                  }
                );
            });
        };
      in {
        devShells = {
          poetry = pkgs.mkShell {
            packages = [
              pkgs.poetry
              python
            ];
          };
          pandas = pkgs.mkShell {
            buildInputs = [
              pandas-env
              pkgs.poetry
            ];
          };
        };
      }
    );
}

error message vvv

% nix develop .\#pandas -L --show-trace
python3.9-pandas> Sourcing python-remove-tests-dir-hook
python3.9-pandas> Sourcing python-catch-conflicts-hook.sh
python3.9-pandas> Sourcing python-remove-bin-bytecode-hook.sh
python3.9-pandas> Sourcing pypa-install-hook
python3.9-pandas> Using pypaInstallPhase
python3.9-pandas> Sourcing python-imports-check-hook.sh
python3.9-pandas> Using pythonImportsCheckPhase
python3.9-pandas> Sourcing python-namespaces-hook
python3.9-pandas> Sourcing pip-build-hook
python3.9-pandas> Using pipBuildPhase
python3.9-pandas> Using pipShellHook
python3.9-pandas> Running phase: unpackPhase
python3.9-pandas> unpacking source archive /nix/store/z6kcw10jha7qvmdlq63pv3mr64c678gg-pandas-2.2.0.tar.gz
python3.9-pandas> source root is pandas-2.2.0
python3.9-pandas> setting SOURCE_DATE_EPOCH to timestamp 1705699087 of file pandas-2.2.0/_version_meson.py
python3.9-pandas> Running phase: patchPhase
python3.9-pandas> Removing path dependencies
python3.9-pandas> Finished removing path dependencies
python3.9-pandas> Removing git dependencies
python3.9-pandas> Finished removing git dependencies
python3.9-pandas> Removing wheel-url dependencies
python3.9-pandas> Finished removing wheel-url dependencies
python3.9-pandas> Running phase: updateAutotoolsGnuConfigScriptsPhase
python3.9-pandas> Running phase: configurePhase
python3.9-pandas> no configure script, doing nothing
python3.9-pandas> Running phase: buildPhase
python3.9-pandas> Executing pipBuildPhase
python3.9-pandas> Creating a wheel...
python3.9-pandas> WARNING: The directory '/homeless-shelter/.cache/pip' or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo's -H flag.
python3.9-pandas> Processing /build/pandas-2.2.0
python3.9-pandas>   Running command Preparing metadata (pyproject.toml)
python3.9-pandas>   + meson setup /build/pandas-2.2.0 /build/pandas-2.2.0/.mesonpy-lv7as6fy -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --vsenv --native-file=/build/pandas-2.2.0/.mesonpy-lv7as6fy/meson-python-native-file.ini
python3.9-pandas>   The Meson build system
python3.9-pandas>   Version: 1.3.0
python3.9-pandas>   Source dir: /build/pandas-2.2.0
python3.9-pandas>   Build dir: /build/pandas-2.2.0/.mesonpy-lv7as6fy
python3.9-pandas>   Build type: native build
python3.9-pandas>   Project name: pandas
python3.9-pandas>   Project version: 2.2.0
python3.9-pandas>   C compiler for the host machine: gcc (gcc 13.2.0 "gcc (GCC) 13.2.0")
python3.9-pandas>   C linker for the host machine: gcc ld.bfd 2.40
python3.9-pandas>   C++ compiler for the host machine: g++ (gcc 13.2.0 "g++ (GCC) 13.2.0")
python3.9-pandas>   C++ linker for the host machine: g++ ld.bfd 2.40
python3.9-pandas>   Cython compiler for the host machine: cython (cython 0.29.36)
python3.9-pandas>   Host machine cpu family: x86_64
python3.9-pandas>   Host machine cpu: x86_64
python3.9-pandas>   Program python found: YES (/nix/store/29gs240159d8rb3kyskpy12mmnfvh0sd-python3-3.9.18/bin/python3.9)
python3.9-pandas>   Found pkg-config: YES (/nix/store/v6n306xw0v850dn01s9fdd0qjwh2j082-pkg-config-wrapper-0.29.2/bin/pkg-config) 0.29.2
python3.9-pandas>   Run-time dependency python found: YES 3.9
python3.9-pandas>   Build targets in project: 53
python3.9-pandas>   pandas 2.2.0
python3.9-pandas>     User defined options
python3.9-pandas>       Native files: /build/pandas-2.2.0/.mesonpy-lv7as6fy/meson-python-native-file.ini
python3.9-pandas>       buildtype   : release
python3.9-pandas>       vsenv       : true
python3.9-pandas>       b_ndebug    : if-release
python3.9-pandas>       b_vscrt     : md
python3.9-pandas>   Found ninja-1.11.1 at /nix/store/msbzwb470a7gqbsv2xvdd4jcrpkl4hmb-ninja-1.11.1/bin/ninja
python3.9-pandas>   Visual Studio environment is needed to run Ninja. It is recommended to use Meson wrapper:
python3.9-pandas>   /nix/store/kymhw7cdmp4alf69pran40s35m347m5z-meson-1.3.0/bin/meson compile -C .
python3.9-pandas>   + /nix/store/msbzwb470a7gqbsv2xvdd4jcrpkl4hmb-ninja-1.11.1/bin/ninja
python3.9-pandas>   [1/151] Generating pandas/_libs/algos_common_helper_pxi with a custom command
python3.9-pandas>   [2/151] Generating pandas/_libs/khash_primitive_helper_pxi with a custom command
python3.9-pandas>   [3/151] Generating pandas/_libs/algos_take_helper_pxi with a custom command
python3.9-pandas>   [4/151] Generating pandas/_libs/hashtable_func_helper_pxi with a custom command
python3.9-pandas>   [5/151] Generating pandas/_libs/index_class_helper_pxi with a custom command
python3.9-pandas>   [6/151] Generating pandas/_libs/intervaltree_helper_pxi with a custom command
python3.9-pandas>   [7/151] Copying file pandas/__init__.py
python3.9-pandas>   [8/151] Generating pandas/_libs/hashtable_class_helper_pxi with a custom command
python3.9-pandas>   [9/151] Generating pandas/_libs/sparse_op_helper_pxi with a custom command
python3.9-pandas>   [10/151] Compiling C object pandas/_libs/pandas_datetime.cpython-39-x86_64-linux-gnu.so.p/src_datetime_pd_datetime.c.o
python3.9-pandas>   [11/151] Compiling C object pandas/_libs/pandas_datetime.cpython-39-x86_64-linux-gnu.so.p/src_datetime_date_conversions.c.o
python3.9-pandas>   [12/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/groupby.pyx
python3.9-pandas>   FAILED: pandas/_libs/groupby.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/groupby.pyx.c
python3.9-pandas>   cython -M --fast-fail -3 --include-dir /build/pandas-2.2.0/.mesonpy-lv7as6fy/pandas/_libs '-X always_allow_keywords=true' /build/pandas-2.2.0/pandas/_libs/groupby.pyx -o pandas/_libs/groupby.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/groupby.pyx.c
python3.9-pandas>   Error compiling Cython file:
python3.9-pandas>   ------------------------------------------------------------
python3.9-pandas>   ...
python3.9-pandas>       sumx = np.zeros((<object>out).shape, dtype=(<object>out).base.dtype)
python3.9-pandas>       compensation = np.zeros((<object>out).shape, dtype=(<object>out).base.dtype)
python3.9-pandas>       N, K = (<object>values).shape
python3.9-pandas>       with nogil(sum_t is not object):
python3.9-pandas>                ^
python3.9-pandas>   ------------------------------------------------------------
python3.9-pandas>   /build/pandas-2.2.0/pandas/_libs/groupby.pyx:698:14: Expected ':', found '('
python3.9-pandas>   [13/151] Compiling C object pandas/_libs/pandas_datetime.cpython-39-x86_64-linux-gnu.so.p/src_vendored_numpy_datetime_np_datetime.c.o
python3.9-pandas>   [14/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/indexing.pyx
python3.9-pandas>   [15/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/internals.pyx
python3.9-pandas>   FAILED: pandas/_libs/internals.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/internals.pyx.c
python3.9-pandas>   cython -M --fast-fail -3 --include-dir /build/pandas-2.2.0/.mesonpy-lv7as6fy/pandas/_libs '-X always_allow_keywords=true' /build/pandas-2.2.0/pandas/_libs/internals.pyx -o pandas/_libs/internals.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/internals.pyx.c
python3.9-pandas>   Error compiling Cython file:
python3.9-pandas>   ------------------------------------------------------------
python3.9-pandas>   ...
python3.9-pandas>   from collections import defaultdict
python3.9-pandas>   import weakref
python3.9-pandas>   cimport cython
python3.9-pandas>   from cpython.pyport cimport PY_SSIZE_T_MAX
python3.9-pandas>   ^
python3.9-pandas>   ------------------------------------------------------------
python3.9-pandas>   /build/pandas-2.2.0/pandas/_libs/internals.pyx:5:0: 'cpython/pyport.pxd' not found
python3.9-pandas>   [16/151] Compiling C object pandas/_libs/pandas_parser.cpython-39-x86_64-linux-gnu.so.p/src_parser_io.c.o
python3.9-pandas>   [17/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/base.pyx
python3.9-pandas>   [18/151] Compiling C object pandas/_libs/pandas_datetime.cpython-39-x86_64-linux-gnu.so.p/src_vendored_numpy_datetime_np_datetime_strings.c.o
python3.9-pandas>   [19/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/algos.pyx
python3.9-pandas>   FAILED: pandas/_libs/algos.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/algos.pyx.c
python3.9-pandas>   cython -M --fast-fail -3 --include-dir /build/pandas-2.2.0/.mesonpy-lv7as6fy/pandas/_libs '-X always_allow_keywords=true' /build/pandas-2.2.0/pandas/_libs/algos.pyx -o pandas/_libs/algos.cpython-39-x86_64-linux-gnu.so.p/pandas/_libs/algos.pyx.c
python3.9-pandas>   Error compiling Cython file:
python3.9-pandas>   ------------------------------------------------------------
python3.9-pandas>   ...
python3.9-pandas>       # each incremental i value can be looked up in the lexsort_indexer
python3.9-pandas>       # array that we sorted previously, which gives us the location of
python3.9-pandas>       # that sorted value for retrieval back from the original
python3.9-pandas>       # values / masked_vals arrays
python3.9-pandas>       # TODO(cython3): de-duplicate once cython supports conditional nogil
python3.9-pandas>       with gil(numeric_object_t is object):
python3.9-pandas>              ^
python3.9-pandas>   ------------------------------------------------------------
python3.9-pandas>   /build/pandas-2.2.0/pandas/_libs/algos.pyx:1147:12: Expected ':', found '('
python3.9-pandas>   [20/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/ccalendar.pyx
python3.9-pandas>   [21/151] Compiling C object pandas/_libs/tslibs/parsing.cpython-39-x86_64-linux-gnu.so.p/.._src_parser_tokenizer.c.o
python3.9-pandas>   [22/151] Compiling C object pandas/_libs/lib.cpython-39-x86_64-linux-gnu.so.p/src_parser_tokenizer.c.o
python3.9-pandas>   [23/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/nattype.pyx
python3.9-pandas>   [24/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/dtypes.pyx
python3.9-pandas>   [25/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/arrays.pyx
python3.9-pandas>   [26/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/missing.pyx
python3.9-pandas>   [27/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/np_datetime.pyx
python3.9-pandas>   [28/151] Compiling C object pandas/_libs/pandas_parser.cpython-39-x86_64-linux-gnu.so.p/src_parser_tokenizer.c.o
python3.9-pandas>   [29/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/hashing.pyx
python3.9-pandas>   [30/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/timezones.pyx
python3.9-pandas>   [31/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/vectorized.pyx
python3.9-pandas>   [32/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/parsing.pyx
python3.9-pandas>   [33/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/tzconversion.pyx
python3.9-pandas>   [34/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/conversion.pyx
python3.9-pandas>   [35/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/timestamps.pyx
python3.9-pandas>   [36/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/fields.pyx
python3.9-pandas>   [37/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/strptime.pyx
python3.9-pandas>   [38/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/offsets.pyx
python3.9-pandas>   [39/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/timedeltas.pyx
python3.9-pandas>   [40/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/tslibs/period.pyx
python3.9-pandas>   [41/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/lib.pyx
python3.9-pandas>   [42/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/index.pyx
python3.9-pandas>   [43/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/interval.pyx
python3.9-pandas>   [44/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/join.pyx
python3.9-pandas>   [45/151] Compiling Cython source /build/pandas-2.2.0/pandas/_libs/hashtable.pyx
python3.9-pandas>   ninja: build stopped: subcommand failed.
python3.9-pandas>   error: subprocess-exited-with-error
python3.9-pandas>   × Preparing metadata (pyproject.toml) did not run successfully.
python3.9-pandas>   │ exit code: 1
python3.9-pandas>   ╰─> See above for output.
python3.9-pandas>   note: This error originates from a subprocess, and is likely not a problem with pip.
python3.9-pandas>   full command: /nix/store/29gs240159d8rb3kyskpy12mmnfvh0sd-python3-3.9.18/bin/python3.9 /nix/store/varikjjnhhb11lxxvdz5bg7zacgni854-python3.9-pip-23.3.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /build/tmpti23o6k6
python3.9-pandas>   cwd: /build/pandas-2.2.0
python3.9-pandas>   Preparing metadata (pyproject.toml) ... error
python3.9-pandas> error: metadata-generation-failed
python3.9-pandas> × Encountered error while generating package metadata.
python3.9-pandas> ╰─> See above for output.
python3.9-pandas> note: This is an issue with the package mentioned above, not pip.
python3.9-pandas> hint: See above for details.
error: builder for '/nix/store/gij87sklxn2455p8lmrmljr063zmy4h9-python3.9-pandas-2.2.0.drv' failed with exit code 1;
       last 10 log lines:
       >   full command: /nix/store/29gs240159d8rb3kyskpy12mmnfvh0sd-python3-3.9.18/bin/python3.9 /nix/store/varikjjnhhb11lxxvdz5bg7zacgni854-python3.9-pip-23.3.1/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py prepare_metadata_for_build_wheel /build/tmpti23o6k6
       >   cwd: /build/pandas-2.2.0
       >   Preparing metadata (pyproject.toml) ... error
       > error: metadata-generation-failed
       >
       > × Encountered error while generating package metadata.
       > ╰─> See above for output.
       >
       > note: This is an issue with the package mentioned above, not pip.
       > hint: See above for details.
       For full logs, run 'nix log /nix/store/gij87sklxn2455p8lmrmljr063zmy4h9-python3.9-pandas-2.2.0.drv'.
error: 1 dependencies of derivation '/nix/store/z5j81dyyj21xgjbgvyl094ymbqc0zdvv-python3-3.9.18-env.drv' failed to build
error: 1 dependencies of derivation '/nix/store/67yy9m9cvnprkg950d3963gzr6lxshaf-nix-shell-env.drv' failed to build
i just ran into this today and was too stubborn to not figure it out. the solution is that this should work when Cython gets updated to 3.0.9, which you can currently get from staging-next and set in an override
23:52:20
@charles:computer.surgeryCharlesalternatively downgrade pandas to 2.1.x23:52:38

Show newer messages


Back to Room ListRoom Version: 6