1

I am trying to install pyhash with pip. On Ubuntu 20.04.3 with Python 3.8 I was able to install after changing setuptools to 57.5.0 (python -m pip install 'setuptools~=57.5.0')

But on Windows 10 and Python 3.10 I get a compilation error. There are multiple questions here on SO about installing pyhash; based on this answer I made the following changes:

  • python -m pip install 'setuptools~=57.5.0'
  • $env:PYTHON_HOME='C:\Users\I063510\AppData\Local\Programs\Python\Python310'
  • pip install wheel
  • From Microsoft Build Tools install "Desktop development with C++"

Now I get warning and errors as follows (complete output at the bottom):

C:\Users\USERID\AppData\Local\Programs\Python\Python310\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.

I don't care about Python 2 so this in not an issue, but I don't know how to disable it.

This error aborts the installation:

  C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcsrc/fnv/hash_32.c /Fobuild\temp.win-amd64-3.10\src/fnv/hash_32.obj
  hash_32.c
  C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(91): error C2061: syntax error: identifier 'Fnv32_t'
  C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(91): error C2059: syntax error: ';'

It seems the files are removed by pip so I am not able to view or attach fnv.h

Here's the complete output from pip:

PS C:\cygwin64\home\USERID\work\sandbox.userid\home\bin> $env:PYTHON_HOME='C:\Users\USERID\AppData\Local\Programs\Python\Python310'
PS C:\cygwin64\home\USERID\work\sandbox.userid\home\bin> pip install pyhash
Collecting pyhash
  Using cached pyhash-0.9.3.tar.gz (602 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: pyhash
  Building wheel for pyhash (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [83 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\pyhash
      copying pyhash\__init__.py -> build\lib.win-amd64-3.10\pyhash
      C:\Users\USERID\AppData\Local\Programs\Python\Python310\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.10\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.10\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.win-amd64-3.10
      creating build\temp.win-amd64-3.10\src
      creating build\temp.win-amd64-3.10\src\fnv
      C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcsrc/fnv/hash_32.c /Fobuild\temp.win-amd64-3.10\src/fnv/hash_32.obj
      hash_32.c
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(91): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(91): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(133): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(133): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(201): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(202): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(205): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(206): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(209): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(210): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(213): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(214): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(217): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(218): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(221): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(222): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(232): error C2061: syntax error: identifier 'fnv_32_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(232): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(232): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(233): error C2061: syntax error: identifier 'fnv_32_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(233): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(233): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(236): error C2061: syntax error: identifier 'fnv_32a_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(236): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(236): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(237): error C2061: syntax error: identifier 'fnv_32a_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(237): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(237): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(240): error C2061: syntax error: identifier 'fnv_64_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(240): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(240): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(241): error C2061: syntax error: identifier 'fnv_64_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(241): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(241): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(244): error C2061: syntax error: identifier 'fnv_64a_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(244): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(244): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(245): error C2061: syntax error: identifier 'fnv_64a_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(245): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(245): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2146: syntax error: missing ')' before identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2061: syntax error: identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2059: syntax error: ','
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2059: syntax error: ')'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2146: syntax error: missing ')' before identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2061: syntax error: identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2059: syntax error: ','
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\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: '<parameter-list>'
      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: '<parameter-list>'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' 
failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pyhash
  Running setup.py clean for pyhash
Failed to build pyhash
Installing collected packages: pyhash
  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
  ╰─> [83 lines of output]
      running install
      running build
      running build_py
      creating build
      creating build\lib.win-amd64-3.10
      creating build\lib.win-amd64-3.10\pyhash
      copying pyhash\__init__.py -> build\lib.win-amd64-3.10\pyhash
      C:\Users\USERID\AppData\Local\Programs\Python\Python310\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.10\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.10\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.win-amd64-3.10
      creating build\temp.win-amd64-3.10\src
      creating build\temp.win-amd64-3.10\src\fnv
      C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -IC:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\include -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\ucrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\shared -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\um -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\winrt -IC:\Program Files (x86)\Windows Kits\10\include\10.0.19041.0\cppwinrt /Tcsrc/fnv/hash_32.c /Fobuild\temp.win-amd64-3.10\src/fnv/hash_32.obj
      hash_32.c
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(91): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(91): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(133): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(133): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(201): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(202): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(205): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(206): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(209): error C2061: syntax error: identifier 'Fnv32_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(210): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(213): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(214): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(217): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(218): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(221): error C2061: syntax error: identifier 'Fnv64_t'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(222): error C2059: syntax error: '}'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(232): error C2061: syntax error: identifier 'fnv_32_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(232): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(232): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(233): error C2061: syntax error: identifier 'fnv_32_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(233): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(233): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(236): error C2061: syntax error: identifier 'fnv_32a_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(236): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(236): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(237): error C2061: syntax error: identifier 'fnv_32a_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(237): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(237): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(240): error C2061: syntax error: identifier 'fnv_64_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(240): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(240): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(241): error C2061: syntax error: identifier 'fnv_64_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(241): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(241): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(244): error C2061: syntax error: identifier 'fnv_64a_buf'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(244): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(244): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(245): error C2061: syntax error: identifier 'fnv_64a_str'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(245): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(245): error C2059: syntax error: '<parameter-list>'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2146: syntax error: missing ')' before identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2061: syntax error: identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2059: syntax error: ','
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(260): error C2059: syntax error: ')'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2146: syntax error: missing ')' before identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2061: syntax error: identifier 'hval'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2059: syntax error: ';'
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\src\fnv\fnv.h(261): error C2059: syntax error: ','
      C:\Users\USERID\AppData\Local\Temp\pip-install-uggpm5x9\pyhash_c9711392a4754ec3bd781c4d8eac992d\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: '<parameter-list>'
      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: '<parameter-list>'
      error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [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.
PS C:\cygwin64\home\USERID\work\sandbox.userid\home\bin>
Miserable Variable
  • 28,432
  • 15
  • 72
  • 133
  • "It seems the files are removed by pip so I am not able to view or attach fnv.h" I believe you are referring to [this](https://github.com/flier/pyfasthash/blob/master/src/fnv/fnv.h). – Karl Knechtel Mar 31 '22 at 00:11
  • 1
    Looking at the code near line 91 in that header, it looks to me like it's [depending on a non-standard typename](https://stackoverflow.com/questions/5163835/what-is-u-int32-t) being available on builds where `WIN32` isn't defined. Since you are using Cygwin, I'm not sure that it would be defined. Especially if you want a 64-bit build. – Karl Knechtel Mar 31 '22 at 00:17
  • At any rate, whether I'm on the right track with that, this seems to me like material for a bug report, not a Stack Overflow question. – Karl Knechtel Mar 31 '22 at 00:17
  • Thanks @KarlKnechtel I no longer know enough to create bug reports on C compilation errors. But thanks for your comments. – Miserable Variable Apr 01 '22 at 00:37
  • 1
    Writing a bug report doesn't require you to understand the code. It only requires that you can list out steps to reproduce the problem, an appropriate error message, etc. Hypotheses about fixing the problem are totally optional. – Karl Knechtel Apr 01 '22 at 06:54
  • @KarlKnechtel I personally feel frustrated it when I have to handle a ticket and the reporter is completely clueless; it also often requires follow-up (try something different etc.) that I just don't have bandwidth for. I am being selfish here, I already found an alternative (xxhash) :) – Miserable Variable Apr 01 '22 at 18:01

1 Answers1

0

Try installing it from the Git repository. There are some fixes there that are not released on PyPI yet.

pip install git+https://github.com/flier/pyfasthash
H4iku
  • 674
  • 2
  • 6
  • 23
  • 1
    This got me past the original issue but I got another error, which as I discovered yesterday during a different activity, is because I haven't installed python development in cygwin. I was able to install `xxhash` without any issue so decided to use that. – Miserable Variable Apr 01 '22 at 01:07