pycairo required even if I don't have it in my requirements.txt

210 Views Asked by At

I have a pycairo issue when I upload my Django project to Railway (which uses AWS)

#11 35.61   Building wheel for pycairo (pyproject.toml): finished with status 'error'
#11 35.62   error: subprocess-exited-with-error
#11 35.62
#11 35.62   × Building wheel for pycairo (pyproject.toml) did not run successfully.
#11 35.62   │ exit code: 1
#11 35.62   ╰─> [15 lines of output]
#11 35.62       running bdist_wheel
#11 35.62       running build
#11 35.62       running build_py
#11 35.62       creating build
#11 35.62       creating build/lib.linux-x86_64-cpython-38
#11 35.62       creating build/lib.linux-x86_64-cpython-38/cairo
#11 35.62       copying cairo/__init__.py -> build/lib.linux-x86_64-cpython-38/cairo
#11 35.62       copying cairo/__init__.pyi -> build/lib.linux-x86_64-cpython-38/cairo
#11 35.62       copying cairo/py.typed -> build/lib.linux-x86_64-cpython-38/cairo
#11 35.62       running build_ext
#11 35.62       Package cairo was not found in the pkg-config search path.
#11 35.62       Perhaps you should add the directory containing `cairo.pc'
#11 35.62       to the PKG_CONFIG_PATH environment variable
#11 35.62       No package 'cairo' found
#11 35.62       Command '['pkg-config', '--print-errors', '--exists', 'cairo >= 1.15.10']' returned non-zero exit status 1.
#11 35.62       [end of output]
#11 35.62
#11 35.62   note: This error originates from a subprocess, and is likely not a problem with pip.
#11 35.62   ERROR: Failed building wheel for pycairo
#11 35.62 Failed to build pycairo
#11 35.62 ERROR: Could not build wheels for pycairo, which is required to install pyproject.toml-based projects

But I'm not using any pycairo library in my requeriments.txt

django-storages==1.11.1
boto3==1.17.18
dj-database-url==0.5.0
Django==3.0.8
django-bootstrap4==2.2.0
django-chartit==0.2.9
django-cors-headers==3.4.0
django-crum==0.7.6
django-forms-bootstrap==3.1.0
django-heroku==0.3.1
django-postgrespool2==1.0.1
django-widget-tweaks==1.4.8
gunicorn==20.0.4
json5==0.9.5
jsonschema==3.2.0
numpy==1.18.5
numpydoc==1.0.0
pandas==1.0.5
psycopg2==2.9.6
requests==2.24.0
whitenoise==5.1.0
boto==2.49.0
more-itertools==8.4.0
xhtml2pdf==0.2.4

How can I know which library is using pycairo so I can remove it?

SOLVED: I removed xhtml2pdf==0.2.4 and added at the begining reportlab==3.6.13

reportlab==3.6.13
django-storages==1.11.1
boto3==1.17.18
...
boto==2.49.0
more-itertools==8.4.0
0

There are 0 best solutions below