flier / pyfasthash

Python Non-cryptographic Hash Library
Apache License 2.0
281 stars 52 forks source link

pyhash 0.9.3 does not install on Python 3.11 #65

Open dmartin35 opened 1 year ago

dmartin35 commented 1 year ago

On a fresh virtualenv, with python 3.11, I cannot install latest pyhash version

has this one already seen by others ? in case python 3.11 is not yet officially supported, is there an estimated date for supporting it ?

thanks in advance

PS: i pasted below the full pip install traceback.

$ pip install -U "setuptools<58"

$ pip install "pyhash~=0.9.3"
Collecting pyhash~=0.9.3
  Preparing metadata (setup.py) ... done
Installing collected packages: pyhash
  DEPRECATION: pyhash is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
  Running setup.py install for pyhash ... error
  error: subprocess-exited-with-error

  × Running setup.py install for pyhash did not run successfully.
  │ exit code: 1
  ╰─> [248 lines of output]
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      WARNING: The wheel package is not available.
      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.11
      creating build/lib.linux-x86_64-3.11/pyhash
      copying pyhash/__init__.py -> build/lib.linux-x86_64-3.11/pyhash
      /home/dma/.pyenv/versions/3.11.2/envs/py311/lib/python3.11/site-packages/setuptools/lib2to3_ex.py:36: SetuptoolsDeprecationWarning: 2to3 support is deprecated. If the project still requires Python 2 support, please migrate to a single-codebase solution or employ an independent conversion process.
        warnings.warn(
      Fixing build/lib.linux-x86_64-3.11/pyhash/__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      Fixing build/lib.linux-x86_64-3.11/pyhash/__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      running build_clib
      building 'fnv' library
      creating build/temp.linux-x86_64-3.11
      creating build/temp.linux-x86_64-3.11/src
      creating build/temp.linux-x86_64-3.11/src/fnv
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/fnv/hash_32.c -o build/temp.linux-x86_64-3.11/src/fnv/hash_32.o
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/fnv/hash_32a.c -o build/temp.linux-x86_64-3.11/src/fnv/hash_32a.o
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/fnv/hash_64.c -o build/temp.linux-x86_64-3.11/src/fnv/hash_64.o
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/fnv/hash_64a.c -o build/temp.linux-x86_64-3.11/src/fnv/hash_64a.o
      ar rcs build/temp.linux-x86_64-3.11/libfnv.a build/temp.linux-x86_64-3.11/src/fnv/hash_32.o build/temp.linux-x86_64-3.11/src/fnv/hash_32a.o build/temp.linux-x86_64-3.11/src/fnv/hash_64.o build/temp.linux-x86_64-3.11/src/fnv/hash_64a.o
      building 'smhasher' library
      creating build/temp.linux-x86_64-3.11/src/smhasher
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/MurmurHash1.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/MurmurHash1.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/MurmurHash2.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/MurmurHash2.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/MurmurHash3.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/MurmurHash3.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/City.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/City.o -msse4.2 -maes -mavx -mavx2
      src/smhasher/City.cpp: In function ‘uint32 Hash32Len0to4(const char*, size_t, uint32)’:
      src/smhasher/City.cpp:148:21: warning: comparison of integer expressions of different signedness: ‘int’ and ‘size_t’ {aka ‘long unsigned int’} [-Wsign-compare]
        148 |   for (int i = 0; i < len; i++) {
            |                   ~~^~~~~
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/Spooky.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/Spooky.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/metrohash64.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/metrohash64.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/metrohash64crc.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/metrohash64crc.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/metrohash128.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/metrohash128.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/metrohash128crc.cpp -o build/temp.linux-x86_64-3.11/src/smhasher/metrohash128crc.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/xxhash.c -o build/temp.linux-x86_64-3.11/src/smhasher/xxhash.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/smhasher/farmhash-c.c -o build/temp.linux-x86_64-3.11/src/smhasher/farmhash-c.o -msse4.2 -maes -mavx -mavx2
      ar rcs build/temp.linux-x86_64-3.11/libsmhasher.a build/temp.linux-x86_64-3.11/src/smhasher/MurmurHash1.o build/temp.linux-x86_64-3.11/src/smhasher/MurmurHash2.o build/temp.linux-x86_64-3.11/src/smhasher/MurmurHash3.o build/temp.linux-x86_64-3.11/src/smhasher/City.o build/temp.linux-x86_64-3.11/src/smhasher/Spooky.o build/temp.linux-x86_64-3.11/src/smhasher/metrohash64.o build/temp.linux-x86_64-3.11/src/smhasher/metrohash64crc.o build/temp.linux-x86_64-3.11/src/smhasher/metrohash128.o build/temp.linux-x86_64-3.11/src/smhasher/metrohash128crc.o build/temp.linux-x86_64-3.11/src/smhasher/xxhash.o build/temp.linux-x86_64-3.11/src/smhasher/farmhash-c.o
      building 't1ha' library
      creating build/temp.linux-x86_64-3.11/src/t1ha
      creating build/temp.linux-x86_64-3.11/src/t1ha/src
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DT1HA0_AESNI_AVAILABLE=1 -DT1HA0_RUNTIME_SELECT=1 -c src/t1ha/src/t1ha0.c -o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DT1HA0_AESNI_AVAILABLE=1 -DT1HA0_RUNTIME_SELECT=1 -c src/t1ha/src/t1ha0_ia32aes_avx.c -o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0_ia32aes_avx.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DT1HA0_AESNI_AVAILABLE=1 -DT1HA0_RUNTIME_SELECT=1 -c src/t1ha/src/t1ha0_ia32aes_avx2.c -o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0_ia32aes_avx2.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DT1HA0_AESNI_AVAILABLE=1 -DT1HA0_RUNTIME_SELECT=1 -c src/t1ha/src/t1ha0_ia32aes_noavx.c -o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0_ia32aes_noavx.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DT1HA0_AESNI_AVAILABLE=1 -DT1HA0_RUNTIME_SELECT=1 -c src/t1ha/src/t1ha1.c -o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha1.o -msse4.2 -maes -mavx -mavx2
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DT1HA0_AESNI_AVAILABLE=1 -DT1HA0_RUNTIME_SELECT=1 -c src/t1ha/src/t1ha2.c -o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha2.o -msse4.2 -maes -mavx -mavx2
      ar rcs build/temp.linux-x86_64-3.11/libt1ha.a build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0.o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0_ia32aes_avx.o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0_ia32aes_avx2.o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha0_ia32aes_noavx.o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha1.o build/temp.linux-x86_64-3.11/src/t1ha/src/t1ha2.o
      building 'lookup3' library
      creating build/temp.linux-x86_64-3.11/src/lookup3
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/lookup3/lookup3.c -o build/temp.linux-x86_64-3.11/src/lookup3/lookup3.o
      ar rcs build/temp.linux-x86_64-3.11/liblookup3.a build/temp.linux-x86_64-3.11/src/lookup3/lookup3.o
      building 'SuperFastHash' library
      creating build/temp.linux-x86_64-3.11/src/SuperFastHash
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -c src/SuperFastHash/SuperFastHash.c -o build/temp.linux-x86_64-3.11/src/SuperFastHash/SuperFastHash.o
      ar rcs build/temp.linux-x86_64-3.11/libSuperFastHash.a build/temp.linux-x86_64-3.11/src/SuperFastHash/SuperFastHash.o
      running build_ext
      building '_pyhash' extension
      gcc -pthread -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -DSUPPORT_INT128=1 -Isrc/pybind11/include -I/home/dma/.pyenv/versions/3.11.2/envs/py311/include -I/home/dma/.pyenv/versions/3.11.2/include/python3.11 -c src/Hash.cpp -o build/temp.linux-x86_64-3.11/src/Hash.o -msse4.2 -maes -mavx -mavx2 -std=c++11
      In file included from src/pybind11/include/pybind11/cast.h:16,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/detail/internals.h: In function ‘pybind11::detail::internals& pybind11::detail::get_internals()’:
      src/pybind11/include/pybind11/detail/internals.h:200:28: warning: ‘void PyEval_InitThreads()’ is deprecated [-Wdeprecated-declarations]
        200 |         PyEval_InitThreads();
            |                            ^
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:95,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/ceval.h:132:37: note: declared here
        132 | Py_DEPRECATED(3.9) PyAPI_FUNC(void) PyEval_InitThreads(void);
            |                                     ^~~~~~~~~~~~~~~~~~
      In file included from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/cast.h: In function ‘std::string pybind11::detail::error_string()’:
      src/pybind11/include/pybind11/cast.h:442:36: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        442 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
            |                                    ^~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:42,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/cast.h:442:75: error: expected primary-expression before ‘>’ token
        442 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
            |                                                                           ^
      src/pybind11/include/pybind11/cast.h:442:77: error: expected primary-expression before ‘)’ token
        442 |                 "  " + handle(frame->f_code->co_filename).cast<std::string>() +
            |                                                                             ^
      src/pybind11/include/pybind11/cast.h:444:29: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        444 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
            |                             ^~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:42,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/cast.h:444:64: error: expected primary-expression before ‘>’ token
        444 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
            |                                                                ^
      src/pybind11/include/pybind11/cast.h:444:66: error: expected primary-expression before ‘)’ token
        444 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
            |                                                                  ^
      src/pybind11/include/pybind11/cast.h:445:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
        445 |             frame = frame->f_back;
            |                          ^~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:42,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/pybind11.h: In function ‘pybind11::function pybind11::get_type_overload(const void*, const pybind11::detail::type_info*, const char*)’:
      src/pybind11/include/pybind11/pybind11.h:2021:49: error: ‘PyThreadState’ {aka ‘struct _ts’} has no member named ‘frame’; did you mean ‘cframe’?
       2021 |     PyFrameObject *frame = PyThreadState_Get()->frame;
            |                                                 ^~~~~
            |                                                 cframe
      src/pybind11/include/pybind11/pybind11.h:2022:41: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
       2022 |     if (frame && (std::string) str(frame->f_code->co_name) == name &&
            |                                         ^~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:42,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/pybind11.h:2023:14: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
       2023 |         frame->f_code->co_argcount > 0) {
            |              ^~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:42,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/pybind11.h:2026:18: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
       2026 |             frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
            |                  ^~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:42,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:38,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      src/pybind11/include/pybind11/pybind11.h:2026:52: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
       2026 |             frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
            |                                                    ^~
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pyport.h:24:38: note: in definition of macro ‘_Py_CAST’
         24 | #define _Py_CAST(type, expr) ((type)(expr))
            |                                      ^~~~
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/cpython/tupleobject.h:30:38: note: in expansion of macro ‘_PyTuple_CAST’
         30 | #define PyTuple_GET_ITEM(op, index) (_PyTuple_CAST(op)->ob_item[index])
            |                                      ^~~~~~~~~~~~~
      src/pybind11/include/pybind11/pybind11.h:2026:30: note: in expansion of macro ‘PyTuple_GET_ITEM’
       2026 |             frame->f_locals, PyTuple_GET_ITEM(frame->f_code->co_varnames, 0));
            |                              ^~~~~~~~~~~~~~~~
      In file included from /home/dma/.pyenv/versions/3.11.2/include/python3.11/Python.h:42,
                       from src/pybind11/include/pybind11/detail/common.h:112,
                       from src/pybind11/include/pybind11/pytypes.h:12,
                       from src/pybind11/include/pybind11/cast.h:13,
                       from src/pybind11/include/pybind11/attr.h:13,
                       from src/pybind11/include/pybind11/pybind11.h:44,
                       from src/Hash.h:6,
                       from src/Hash.cpp:1:
      /home/dma/.pyenv/versions/3.11.2/include/python3.11/pytypedefs.h:22:16: note: forward declaration of ‘PyFrameObject’ {aka ‘struct _frame’}
         22 | typedef struct _frame PyFrameObject;
            |                ^~~~~~
      error: command '/usr/bin/gcc' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pyhash

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
realsama commented 1 year ago

+1

Poly2it commented 1 year ago

Well, this is annoying. I'm also experiencing the issue.

tomc commented 1 year ago

I'm trying to install in Windows but still 3.11. I'm getting a different installation error:

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [8 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\tomc7\AppData\Local\Temp\pip-install-jwedw12n\pyhash_e10c304914dd4236b46b78327d26b312\setup.py", line 38, in os.path.join(os.environ.get('PYTHON_HOME'), 'include'), ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "", line 108, in join TypeError: expected str, bytes or os.PathLike object, not NoneType [end of output]

My pip is up to date.

anentropic commented 1 year ago

@tomc see https://github.com/flier/pyfasthash/issues/68 (I am not on Windows myself so I can't test any fix, maybe you can help them)

McCache commented 10 months ago

On my windows machine, after install Microsfor Build tool, I got the following error:

C:\DataRoot\Work\PyCache $ python --version
Python 3.11.3

C:\DataRoot\Work\PyCache $ set PYTHON_HOME="C:\Program Files\Python311"

C:\DataRoot\Work\PyCache $ pipenv install pyhash
Installing pyhash...
Resolving pyhash...
Installing...
[   =] Installing pyhash...[31m[1mError: [0m An error occurred while installing [32mpyhash[0m!
Error text: Looking in indexes: https://pypi.org/simple, https://testpypi.org/simple
Collecting pyhash (from -r c:\users\elau1\appdata\local\temp\pipenv-vb6oqr5e-requirements\pipenv-vcurx2o5-requirement.txt (line 1))
  Using cached pyhash-0.9.3.tar.gz (602 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: pyhash
  Building wheel for pyhash (setup.py): started
  Building wheel for pyhash (setup.py): finished with status 'error'
  Running setup.py clean for pyhash
Failed to build pyhash

[36mWARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by
'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo
failed')': /simple/pyhash/
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by
'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo
failed')': /simple/pyhash/
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by
'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo
failed')': /simple/pyhash/
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by
'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo
failed')': /simple/pyhash/
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by
'NewConnectionError(': Failed to establish a new connection: [Errno 11001] getaddrinfo
failed')': /simple/pyhash/
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [85 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.11
      creating build\lib.win-amd64-3.11\pyhash
      copying pyhash\__init__.py -> build\lib.win-amd64-3.11\pyhash
      C:\Users\elau1\.virtualenvs\PyCache-NOLGBfFo\Lib\site-packages\setuptools\lib2to3_ex.py:36: SetuptoolsDeprecationWarning: 2to3 support is deprecated. If the project still requires
Python 2 support, please migrate to a single-codebase solution or employ an independent conversion process.
        warnings.warn(
      Fixing build\lib.win-amd64-3.11\pyhash\__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      Fixing build\lib.win-amd64-3.11\pyhash\__init__.py
      Skipping optional fixer: buffer
      Skipping optional fixer: idioms
      Skipping optional fixer: set_literal
      Skipping optional fixer: ws_comma
      warning: build_py: byte-compiling is disabled, skipping.

      running build_clib
      building 'fnv' library
      creating build\temp.win-amd64-3.11
      creating build\temp.win-amd64-3.11\src
      creating build\temp.win-amd64-3.11\src\fnv
      C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Program Files (x86)\Microsoft
Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.38.33130\include -IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include -IC:\Program Files (x86)\Windows
Kits\10\include\10.0.22621.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\um -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\shared -IC:\Program
Files (x86)\Windows Kits\10\\include\10.0.22621.0\\winrt -IC:\Program Files (x86)\Windows Kits\10\\include\10.0.22621.0\\cppwinrt -IC:\Program Files (x86)\Windows
Kits\NETFXSDK\4.8\include\um /Tcsrc/fnv/hash_32.c /Fobuild\temp.win-amd64-3.11\src/fnv/hash_32.obj
      hash_32.c
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(91): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(91): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(133): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(133): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(201): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(202): error C2059: syntax error: '}'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(205): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(206): error C2059: syntax error: '}'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(209): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(210): error C2059: syntax error: '}'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(213): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(214): error C2059: syntax error: '}'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(217): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(218): error C2059: syntax error: '}'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(221): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(222): error C2059: syntax error: '}'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(232): error C2061: syntax error: identifier 'fnv_32_buf'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(232): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(232): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(233): error C2061: syntax error: identifier 'fnv_32_str'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(233): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(233): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(236): error C2061: syntax error: identifier 'fnv_32a_buf'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(236): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(236): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(237): error C2061: syntax error: identifier 'fnv_32a_str'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(237): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(237): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(240): error C2061: syntax error: identifier 'fnv_64_buf'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(240): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(240): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(241): error C2061: syntax error: identifier 'fnv_64_str'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(241): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(241): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(244): error C2061: syntax error: identifier 'fnv_64a_buf'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(244): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(244): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(245): error C2061: syntax error: identifier 'fnv_64a_str'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(245): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(245): error C2059: syntax error: ''
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(260): error C2146: syntax error: missing ')' before identifier 'hval'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(260): error C2061: syntax error: identifier 'hval'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(260): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(260): error C2059: syntax error: ','
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(260): error C2059: syntax error: ')'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(261): error C2146: syntax error: missing ')' before identifier 'hval'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(261): error C2061: syntax error: identifier 'hval'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(261): error C2059: syntax error: ';'
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(261): error C2059: syntax error: ','
      C:\Users\elau1\AppData\Local\Temp\pip-install-7m2halsd\pyhash_eb0259e2dc754b1dbd7ce130066e451c\src\fnv\fnv.h(261): error C2059: syntax error: ')'
      src/fnv/hash_32.c(91): error C2061: syntax error: identifier 'fnv_32_buf'
      src/fnv/hash_32.c(91): error C2059: syntax error: ';'
      src/fnv/hash_32.c(91): error C2059: syntax error: ''
      src/fnv/hash_32.c(134): error C2061: syntax error: identifier 'fnv_32_str'
      src/fnv/hash_32.c(134): error C2059: syntax error: ';'
      src/fnv/hash_32.c(134): error C2059: syntax error: ''
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2022\\BuildTools\\VC\\Tools\\MSVC\\14.38.33130\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyhash
ERROR: Could not build wheels for pyhash, which is required to install pyproject.toml-based projects
[0m
Installation Failed