apache / iceberg-python

Apache PyIceberg
https://py.iceberg.apache.org/
Apache License 2.0
309 stars 114 forks source link

ERROR: Could not build wheels for mmhash3, which is required to install pyproject.toml-based projects #836

Open makssyz opened 1 week ago

makssyz commented 1 week ago

Apache Iceberg version

0.6.0 (latest release)

Please describe the bug 🐞

During the installation of pyiceberg, I always get this error:

Building wheels for collected packages: mmhash3 Building wheel for mmhash3 (pyproject.toml) ... error error: subprocess-exited-with-error

× Building wheel for mmhash3 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [11 lines of output] running bdist_wheel running build running build_ext building 'mmh3' extension creating build creating build\temp.win-amd64-cpython-312 creating build\temp.win-amd64-cpython-312\Release "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.29.30133\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -IC:\path\venv\include -IC:\path\venv\Scripts\include -IC:\path\venv\Scripts\Include "-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" /EHsc /TpMurmurHash3.cpp /Fobuild\temp.win-amd64-cpython-312\Release\MurmurHash3.obj MurmurHash3.cpp C:\Users\e549326\AppData\Local\Temp\pip-install-lrlg3_pd\mmhash3_b96a2f2aab1a4eb3b72cc9c8c1915858\MurmurHash3.h(12): fatal error C1083: Cannot open include file: 'Python.h': No such file or directory 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 mmhash3 Failed to build mmhash3 ERROR: Could not build wheels for mmhash3, which is required to install pyproject.toml-based projects

Fokko commented 1 week ago

@makssyz Thanks for reaching out here. The main branch should be fixed, since we went back to the original package mmh3 that has Python 3.12 wheels: https://pypi.org/project/mmh3/#files

@MehulBatra is looking into officially supporting 3.12, but there are some packages (looking at you Ray), that are not there yet. Most of it works with 3.12, but so you know.

You can try to install it directly from source:

pip install "git+https://github.com/apache/iceberg-python.git#egg=pyiceberg[s3fs,gcsfs,hive,sql-sqlite,duckdb,pandas]"

This will install mmh3 with the wheel package, but still try to compile the Avro decoder that PyIceberg comes with.