Bruno Cippitelli
Pycairo error on deploy
Thanks Adam,
I add this on my nixpacks.toml
[phases.setup]
nixPkgs = ['...', 'cairo', 'pkg-config' ]
but I still get the error on the build proceso.
Part of the log:
║ setup │ python38, gcc, cairo, pkg-config ║
#8 19.87 /nix/store/hjic5yz9kb4h6dw2avw504z5j3fxgmjx-cairo-1.16.0
#8 21.47 copying path '/nix/store/hjic5yz9kb4h6dw2avw504z5j3fxgmjx-cairo-1.16.0' from 'https://cache.nixos.org';...
#10 11.08 Collecting pycairo==1.25.1
#10 18.48 Building wheels for collected packages: pycairo
#10 18.48 Building wheel for pycairo (pyproject.toml): started
#10 18.82 Building wheel for pycairo (pyproject.toml): finished with status 'error'
#10 18.83 × Building wheel for pycairo (pyproject.toml) did not run successfully.
#10 18.83 creating build/lib.linux-x86_64-cpython-38/cairo
#10 18.83 copying cairo/init.py -> build/lib.linux-x86_64-cpython-38/cairo
#10 18.83 copying cairo/init.pyi -> build/lib.linux-x86_64-cpython-38/cairo
#10 18.83 copying cairo/py.typed -> build/lib.linux-x86_64-cpython-38/cairo
#10 18.83 Package cairo was not found in the pkg-config search path.
#10 18.83 Perhaps you should add the directory containing `cairo.pc'
#10 18.83 No package 'cairo' found
#10 18.83 Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
#10 18.83 ERROR: Failed building wheel for pycairo
#10 18.83 Failed to build pycairo
#10 18.83 ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects
18.83 Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
18.83 ERROR: Failed building wheel for pycairo
18.83 Failed to build pycairo
18.83 ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects
13 replies
Pycairo error on deploy
Hi Adam, I have been reasearching and it seams that pycairo is needed by xhtml2pdf . I see my requirements.txt pycairo is there.
In pycairo web the put:
Getting Started
Installation:
pip3 install pycairo
Installing Pycairo requires pkg-config and cairo including its headers. Here are some examples on how to install those for some platforms:
Ubuntu/Debian: sudo apt install libcairo2-dev pkg-config python3-dev
macOS/Homebrew: brew install cairo pkg-config
Arch Linux: sudo pacman -S cairo pkgconf
Fedora: sudo dnf install cairo-devel pkg-config python3-devel
openSUSE: sudo zypper install cairo-devel pkg-config python3-devel
So, it seams that I have to tell railway to install pkg-config and cairo.
13 replies