Skip to content

Could not build wheels for datrie -- using MacOS Monterey (12.6) #97

@bagotaj

Description

@bagotaj

Hey guys, pip install datrie failed
because src/datrie.c:26:10: fatal error: 'Python.h' file not found

the full output:

running bdist_wheel
      running build
      running build_clib
      building 'datrie' library
      libdatrie/datrie/alpha-map.c:500:21: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'AlphaChar' (aka 'unsigned int') [-Wsign-compare]
          if (alpha_begin <= ac && ac <= alpha_map->alpha_end)
              ~~~~~~~~~~~ ^  ~~
      1 warning generated.
      libdatrie/datrie/alpha-map.c:500:21: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'AlphaChar' (aka 'unsigned int') [-Wsign-compare]
          if (alpha_begin <= ac && ac <= alpha_map->alpha_end)
              ~~~~~~~~~~~ ^  ~~
      1 warning generated.
      libdatrie/datrie/darray.c:239:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (d->num_cells > SIZE_MAX / sizeof (DACell))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      libdatrie/datrie/darray.c:239:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (d->num_cells > SIZE_MAX / sizeof (DACell))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      libdatrie/datrie/fileutils.c:103:52: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fread (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      libdatrie/datrie/fileutils.c:109:53: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fwrite (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      2 warnings generated.
      libdatrie/datrie/fileutils.c:103:52: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fread (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      libdatrie/datrie/fileutils.c:109:53: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fwrite (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      2 warnings generated.
      libdatrie/datrie/tail.c:144:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (t->num_tails > SIZE_MAX / sizeof (TailBlock))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      libdatrie/datrie/tail.c:144:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (t->num_tails > SIZE_MAX / sizeof (TailBlock))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: build/temp.macosx-10.9-universal2-cpython-39/libdatrie.a will be fat and ar(1) will not be able to operate on it
      running build_ext
      building 'datrie' extension
      src/datrie.c:26:10: fatal error: 'Python.h' file not found
      #include "Python.h"
               ^~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for datrie
Failed to build datrie
ERROR: Could not build wheels for datrie, which is required to install pyproject.toml-based projects
(rhymedict-multisite) jbagota@Bagotas-MBP rhymedict-multisite % pip install datrie
Collecting datrie
  Using cached datrie-0.8.2.tar.gz (63 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Installing backend dependencies ... done
  Preparing metadata (pyproject.toml) ... done
Building wheels for collected packages: datrie
  Building wheel for datrie (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for datrie (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [50 lines of output]
      running bdist_wheel
      running build
      running build_clib
      building 'datrie' library
      libdatrie/datrie/alpha-map.c:500:21: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'AlphaChar' (aka 'unsigned int') [-Wsign-compare]
          if (alpha_begin <= ac && ac <= alpha_map->alpha_end)
              ~~~~~~~~~~~ ^  ~~
      1 warning generated.
      libdatrie/datrie/alpha-map.c:500:21: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'AlphaChar' (aka 'unsigned int') [-Wsign-compare]
          if (alpha_begin <= ac && ac <= alpha_map->alpha_end)
              ~~~~~~~~~~~ ^  ~~
      1 warning generated.
      libdatrie/datrie/darray.c:239:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (d->num_cells > SIZE_MAX / sizeof (DACell))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      libdatrie/datrie/darray.c:239:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (d->num_cells > SIZE_MAX / sizeof (DACell))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      libdatrie/datrie/fileutils.c:103:52: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fread (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      libdatrie/datrie/fileutils.c:109:53: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fwrite (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      2 warnings generated.
      libdatrie/datrie/fileutils.c:103:52: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fread (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      libdatrie/datrie/fileutils.c:109:53: warning: comparison of integers of different signs: 'unsigned long' and 'int' [-Wsign-compare]
          return (fwrite (buff, sizeof (char), len, file) == len);
                  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~~
      2 warnings generated.
      libdatrie/datrie/tail.c:144:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (t->num_tails > SIZE_MAX / sizeof (TailBlock))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      libdatrie/datrie/tail.c:144:22: warning: comparison of integers of different signs: 'TrieIndex' (aka 'int') and 'unsigned long' [-Wsign-compare]
          if (t->num_tails > SIZE_MAX / sizeof (TailBlock))
              ~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      1 warning generated.
      warning: /Library/Developer/CommandLineTools/usr/bin/ranlib: archive library: build/temp.macosx-10.9-universal2-cpython-39/libdatrie.a will be fat and ar(1) will not be able to operate on it
      running build_ext
      building 'datrie' extension
      src/datrie.c:26:10: fatal error: 'Python.h' file not found
      #include "Python.h"
               ^~~~~~~~~~
      1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for datrie
Failed to build datrie
ERROR: Could not build wheels for datrie, which is required to install pyproject.toml-based projects

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions