can't build wheels for pdftotext
ederson-souza
PROOP

a year ago

I've been trying to install pdftotext pip package but no success. I tried many different configuration in nixpacks.toml and nothing.

The current error:

#11 60.59 Created wheel for docopt: filename=docopt-0.6.2-py2.py3-none-any.whl size=13706 sha256=3ca13bd40abdf37f3ceec46404fe0fa39deccd58047a09d92981710616de5054

#11 60.59 Stored in directory: /tmp/pip-ephem-wheel-cache-5clpelb_/wheels/1a/b0/8c/4b75c4116c31f83c8f9f047231251e13cc74481cca4a78a9ce

#11 60.60 Building wheel for pdftotext (pyproject.toml): started

#11 60.93 Building wheel for pdftotext (pyproject.toml): finished with status 'error'

#11 60.94 error: subprocess-exited-with-error

#11 60.94

#11 60.94 × Building wheel for pdftotext (pyproject.toml) did not run successfully.

#11 60.94 │ exit code: 1

#11 60.94 ╰─> [11 lines of output]

#11 60.94 running bdist_wheel

#11 60.94 running build

#11 60.94 running build_ext

#11 60.94 building 'pdftotext' extension

#11 60.94 creating build/temp.linux-x86_64-cpython-311

#11 60.94 g++ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -I/nix/store/wwg6376ymkhpjxy6c3w9gkbhv6l2gmqy-libxcrypt-4.4.36/include -fPIC -DPOPPLER_CPP_AT_LEAST_0_58_0=1 -DPOPPLER_CPP_AT_LEAST_0_88_0=1 -I/opt/venv/include -I/nix/store/k3701zl6gmx3la7y4dnflcvf3xfy88kh-python3-3.11.9/include/python3.11 -c pdftotext.cpp -o build/temp.linux-x86_64-cpython-311/pdftotext.o -Wall

#11 60.94 pdftotext.cpp:3:10: fatal error: poppler/cpp/poppler-document.h: No such file or directory

#11 60.94 3 | #include

#11 60.94 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#11 60.94 compilation terminated.

#11 60.94 error: command '/root/.nix-profile/bin/g++' failed with exit code 1

#11 60.94 [end of output]

#11 60.94

#11 60.94 note: This error originates from a subprocess, and is likely not a problem with pip.

#11 60.94 ERROR: Failed building wheel for pdftotext

#11 60.94 Successfully built docopt

#11 60.94 Failed to build pdftotext

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

#11 ERROR: process "/bin/bash -ol pipefail -c python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt" did not complete successfully: exit code: 1


> [stage-0 7/9] RUN --mount=type=cache,id=s/81592aa0-a4dd-4260-8b5e-1807e7d4b900-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt:

60.94 | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

60.94 compilation terminated.

60.94 error: command '/root/.nix-profile/bin/g++' failed with exit code 1

60.94 [end of output]

60.94

60.94 note: This error originates from a subprocess, and is likely not a problem with pip.

60.94 ERROR: Failed building wheel for pdftotext

60.94 Successfully built docopt

60.94 Failed to build pdftotext

60.94 ERROR: Could not build wheels for pdftotext, which is required to install pyproject.toml-based projects


Dockerfile:23


My .toml file:

[languages]

providers = ['python310']

[phases.setup]

nixPkgs = ["...","redis", "tesseract"]

nixLibs = ["...", "gcc-unwrapped"]

aptPkgs = ["...", "tesseract-ocr", "libtesseract-dev", "build-essential", "libpoppler-cpp-dev", "pkg-config", "python3-dev"]

the package dependencies:

sudo apt install build-essential libpoppler-cpp-dev pkg-config python3-dev

View Deploy details

> ⓘ Deployment information is only viewable by project members and Railway employees.

Solved

1 Replies

ederson-souza
PROOP

a year ago

Solved changing to Dockerfile


Status changed to Solved chandrika over 1 year ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...