masaccio / numbers-parser

Python module for parsing Apple Numbers .numbers files
MIT License
201 stars 14 forks source link

installation trouble on WIN10 HOME with python311 #47

Closed sinalde closed 1 year ago

sinalde commented 1 year ago

I am trying to install numbers_parsers for more than 4h, now. Meanwhile, I fully installed Visual Studio for having access to the asked for c++ version via MSVC143.

Any help is very appreciated.

Kind regards Dirk

Latest error protocoll:

C:\Users\Dirk>pip install python-snappy Collecting python-snappy Using cached python-snappy-0.6.1.tar.gz (24 kB) Preparing metadata (setup.py) ... done Building wheels for collected packages: python-snappy Building wheel for python-snappy (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [27 lines of output] D:\Programme\Python311\Lib\site-packages\setuptools_distutils\dist.py:265: UserWarning: Unknown distribution option: 'cffi_modules' warnings.warn(msg) running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\snappy copying src\snappy\hadoop_snappy.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy_cffi.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy_cffi_builder.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy_formats.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy__init.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\main__.py -> build\lib.win-amd64-cpython-311\snappy running build_ext building 'snappy._snappy' extension creating build\temp.win-amd64-cpython-311 creating build\temp.win-amd64-cpython-311\Release creating build\temp.win-amd64-cpython-311\Release\src creating build\temp.win-amd64-cpython-311\Release\src\snappy "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\Programme\Python311\include -ID:\Programme\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /Tcsrc/snappy/crc32c.c /Fobuild\temp.win-amd64-cpython-311\Release\src/snappy/crc32c.obj crc32c.c "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\Programme\Python311\include -ID:\Programme\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /EHsc /Tpsrc/snappy/snappymodule.cc /Fobuild\temp.win-amd64-cpython-311\Release\src/snappy/snappymodule.obj snappymodule.cc src/snappy/snappymodule.cc(33): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "snappy-c.h": No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\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 python-snappy Running setup.py clean for python-snappy Failed to build python-snappy Installing collected packages: python-snappy Running setup.py install for python-snappy ... error error: subprocess-exited-with-error

× Running setup.py install for python-snappy did not run successfully. │ exit code: 1 ╰─> [29 lines of output] D:\Programme\Python311\Lib\site-packages\setuptools_distutils\dist.py:265: UserWarning: Unknown distribution option: 'cffi_modules' warnings.warn(msg) running install D:\Programme\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( running build running build_py creating build creating build\lib.win-amd64-cpython-311 creating build\lib.win-amd64-cpython-311\snappy copying src\snappy\hadoop_snappy.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy_cffi.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy_cffi_builder.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\snappy_formats.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy__init.py -> build\lib.win-amd64-cpython-311\snappy copying src\snappy\main__.py -> build\lib.win-amd64-cpython-311\snappy running build_ext building 'snappy._snappy' extension creating build\temp.win-amd64-cpython-311 creating build\temp.win-amd64-cpython-311\Release creating build\temp.win-amd64-cpython-311\Release\src creating build\temp.win-amd64-cpython-311\Release\src\snappy "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\Programme\Python311\include -ID:\Programme\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /Tcsrc/snappy/crc32c.c /Fobuild\temp.win-amd64-cpython-311\Release\src/snappy/crc32c.obj crc32c.c "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\bin\HostX86\x64\cl.exe" /c /nologo /O2 /W3 /GL /DNDEBUG /MD -ID:\Programme\Python311\include -ID:\Programme\Python311\Include "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\include" "-IC:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Auxiliary\VS\include" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\um" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\shared" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\winrt" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.22000.0\cppwinrt" /EHsc /Tpsrc/snappy/snappymodule.cc /Fobuild\temp.win-amd64-cpython-311\Release\src/snappy/snappymodule.obj snappymodule.cc src/snappy/snappymodule.cc(33): fatal error C1083: Datei (Include) kann nicht ge”ffnet werden: "snappy-c.h": No such file or directory error: command 'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC\14.34.31933\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. ╰─> python-snappy

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

C:\Users\Dirk>python Python 3.11.1 (tags/v3.11.1:a7a450f, Dec 6 2022, 19:58:39) [MSC v.1934 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information.

exit()

C:\Users\Dirk>python3 -m pip install numbers-parser Python konnte nicht gefunden werden. F³hren Sie die Verkn³pfung ohne Argumente aus, um sie ³ber den Microsoft Store zu installieren, oder deaktivieren Sie diese Verkn³pfung unter C:\Users\Dirk>

visual_studio_inst

masaccio commented 1 year ago

The key is snappy-c.h": No such file or directory which suggests to me that the Snappy dev libraries are not installed or that VSC++ doesn’t have the include files on its include path.

There is an answer here about installing the wheel that will include the compiled code.

Let me know how you get on and I can add to the Readme for Windows installation.

sinalde commented 1 year ago

Thank you, Jon!

Given the many snappy wheels listed at Christoph's site I felt completely irritated by the many versions, as I am a complete newbie to python and pip. I made my developer's career developing ABAP inside SAP.

So, I started top of list with "python_snappy-0.6.1-pp38-pypy38_pp73-win_amd64.whl". But no fuzz: the installation was safely aborted and I took the 2nd entry "python_snappy-0.6.1-cp311-cp311-win_amd64.whl", which did the job.

Only with this correct result I recognized the nomenclature in the version's names.

Thanks again, Jon. Enjoy a peaceful Sunday.

Files at Christoph's: Python-snappy: wraps the snappy compression library. python_snappy‑0.6.1‑pp38‑pypy38_pp73‑win_amd64.whl python_snappy‑0.6.1‑cp311‑cp311‑win_amd64.whl python_snappy‑0.6.1‑cp311‑cp311‑win32.whl ... and more...

LOG: C:\Users\Dirk>pip install C:\Users\Dirk\Downloads\python_snappy-0.6.1-pp38-pypy38_pp73-win_amd64.whl ERROR: python_snappy-0.6.1-pp38-pypy38_pp73-win_amd64.whl is not a supported wheel on this platform.

C:\Users\Dirk>pip install C:\Users\Dirk\Downloads\python_snappy-0.6.1-cp311-cp311-win_amd64.whl Processing c:\users\dirk\downloads\python_snappy-0.6.1-cp311-cp311-win_amd64.whl Installing collected packages: python-snappy Successfully installed python-snappy-0.6.1

C:\Users\Dirk>pip install numbers-parser Collecting numbers-parser Using cached numbers_parser-3.9.5-py3-none-any.whl (276 kB) Collecting compact-json<2.0.0,>=1.1.3 Using cached compact_json-1.5.0-py3-none-any.whl (15 kB) Collecting pendulum<3.0.0,>=2.1.2 Using cached pendulum-2.1.2-cp311-cp311-win_amd64.whl Collecting protobuf<5.0.0,>=4.21.1 Using cached protobuf-4.21.12-cp310-abi3-win_amd64.whl (527 kB) Requirement already satisfied: python-snappy<0.7.0,>=0.6.1 in d:\programme\python311\lib\site-packages (from numbers-parser) (0.6.1) Collecting regex<2023.0.0,>=2022.9.13 Using cached regex-2022.10.31-cp311-cp311-win_amd64.whl (267 kB) Collecting roman<4.0,>=3.3 Using cached roman-3.3-py2.py3-none-any.whl (3.9 kB) Requirement already satisfied: wcwidth<0.3.0,>=0.2.5 in d:\programme\python311\lib\site-packages (from compact-json<2.0.0,>=1.1.3->numbers-parser) (0.2.6) Requirement already satisfied: python-dateutil<3.0,>=2.6 in d:\programme\python311\lib\site-packages (from pendulum<3.0.0,>=2.1.2->numbers-parser) (2.8.2) Collecting pytzdata>=2020.1 Using cached pytzdata-2020.1-py2.py3-none-any.whl (489 kB) Requirement already satisfied: six>=1.5 in d:\programme\python311\lib\site-packages (from python-dateutil<3.0,>=2.6->pendulum<3.0.0,>=2.1.2->numbers-parser) (1.16.0) Installing collected packages: roman, regex, pytzdata, protobuf, compact-json, pendulum, numbers-parser Successfully installed compact-json-1.5.0 numbers-parser-3.9.5 pendulum-2.1.2 protobuf-4.21.12 pytzdata-2020.1 regex-2022.10.31 roman-3.3

C:\Users\Dirk>