BittyTax / BittyTax

Crypto-currency tax calculator with support for all popular wallets, exchanges, explorers and migration from other crypto tax platforms

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ERROR: Failed building wheel for pycairo

nanonano opened this issue · comments

Discussed in #322

Originally posted by Euro3000 December 8, 2023
hey :) just wanted install it on my Mac but terminal gives me this error:
Downloading cffi-1.16.0-cp311-cp311-macosx_11_0_arm64.whl (176 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 176.7/176.7 kB 7.5 MB/s eta 0:00:00
Building wheels for collected packages: svglib, pycairo
Building wheel for svglib (setup.py) ... done
Created wheel for svglib: filename=svglib-1.5.1-py3-none-any.whl size=30901 sha256=d52800840a62f0521c31b02cba2604f66794ca8ab4c5cc6099c0e882e4b9edb7
Stored in directory: /Users/Erik/Library/Caches/pip/wheels/7e/01/0e/e6e336915d6e8448890a695770ba88fe030cc71060988016f6
Building wheel for pycairo (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for pycairo (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [12 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-14-arm64-cpython-311
creating build/lib.macosx-14-arm64-cpython-311/cairo
copying cairo/init.py -> build/lib.macosx-14-arm64-cpython-311/cairo
copying cairo/init.pyi -> build/lib.macosx-14-arm64-cpython-311/cairo
copying cairo/py.typed -> build/lib.macosx-14-arm64-cpython-311/cairo
running build_ext
'pkg-config' not found.
Command ['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for pycairo
Successfully built svglib
Failed to build pycairo
ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

How to solve this?

Thank you

Hi @Euro3000, what version of python are you running and what how did you install BittyTax, which version?

Looks like you're trying to build all the BittyTax dependancies from source code?

Pycairo is a dependancy on svglib, which is a dependancy on Reportlab which is a dependancy on xhtml2pdf (which BittyTax requires).

Maybe you had Pycairo installed from another application? See https://pycairo.readthedocs.io/en/latest/getting_started.html

Hey
I did install Python with Homebrew and than followed the instruction to install BittyTax for Mac in the guide :)
Maybe I've misread something there.

Strange... what version of MacOS are you running? Also what hardware, is it Apple silicon?

I'm wondering if the binaries included in the pycairo package, aren't compatible with what you're running on and it's having to build it from source.

You could try installing the following and then, do the pip install again. See https://stackoverflow.com/questions/56607764/pip-install-pycairo-fails-on-osx-pkg-config-search-path-problems.

brew install pkg-config
brew install cairo

It's really strange. I had BittyTax installed before resetting my MBP M1 completely. I don't remember running into issues before.
I installed png-config and cairo and it seem to work fine now :) Thank you

Glad it's fixed it.

Please give the project a star! :)