AnyFetch / heroku-buildpack-tesseract

Heroku Tesseract Custom Buildpack
MIT License
10 stars 18 forks source link

I got this problem ................leptonica/allheaders.h #5

Open kevin1061517 opened 5 years ago

kevin1061517 commented 5 years ago

I try lots of time to try to deploy the heroku-buildpack-tesseract buildpack on the heroku. But I got the following error. I try hundreds of time......who is willing to do me a favor?

----------------------------------------------------------------------------------------
remote: Compressing source files... done.
remote: Building source:
remote:
remote: -----> Python app detected
remote:  !     Python has released a security update! Please consider upgrading to python-3.6.7
remote:        Learn More: https://devcenter.heroku.com/articles/python-runtimes
remote: -----> Installing requirements with pip
remote:        Collecting tesseract-ocr (from -r /tmp/build_607266cdb460adde8611fb44bd2beff2/requirements.txt (line 12))
remote:          Downloading https://files.pythonhosted.org/packages/e2/0d/dcee3dd0fc4c7bcd18125a98f8ba6d9db7aecaa40770595203e312649587/tesseract-ocr-0.0.1.tar.gz
remote:        Collecting cython (from tesseract-ocr->-r /tmp/build_607266cdb460adde8611fb44bd2beff2/requirements.txt (line 12))
remote:          Downloading https://files.pythonhosted.org/packages/39/b1/2acbf92bb3c817dc99a7588a6196629a0490b3f940b672136aa4d09f91ea/Cython-0.29.2-cp36-cp36m-manylinux1_x86_64.whl (2.1MB)
remote:        Installing collected packages: cython, tesseract-ocr
remote:          Running setup.py install for tesseract-ocr: started
remote:            Running setup.py install for tesseract-ocr: finished with status 'error'
remote:            Complete output from command /app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0o_ywaor/tesseract-ocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-kw00rm4e-record/install-record.txt --single-version-externally-managed --compile:
remote:            Compiling tesseract_ocr.pyx because it depends on /app/.heroku/python/lib/python3.6/site-packages/Cython/Includes/cpython/weakref.pxd.
remote:            [1/1] Cythonizing tesseract_ocr.pyx
remote:            /app/.heroku/python/lib/python3.6/site-packages/Cython/Compiler/Main.py:367: FutureWarning: Cython directive 'language_level' not set, using 2 for now (Py2). This will change in a later release! File: /tmp/pip-build-0o_ywaor/tesseract-ocr/tesseract_ocr.pyx
remote:              tree = Parsing.p_module(s, pxd, full_module_name)
remote:            running install
remote:            running build
remote:            running build_py
remote:            file tesseract_ocr.py (for module tesseract_ocr) not found
remote:            file tesseract_ocr.py (for module tesseract_ocr) not found
remote:            running build_ext
remote:            building 'tesseract_ocr' extension
remote:            creating build
remote:            creating build/temp.linux-x86_64-3.6
remote:            gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/app/.heroku/python/include/python3.6m -c tesseract_ocr.cpp -o build/temp.linux-x86_64-3.6/tesseract_ocr.o
remote:            tesseract_ocr.cpp:646:34: fatal error: leptonica/allheaders.h: No such file or directory
remote:             #include "leptonica/allheaders.h"
remote:                                              ^
remote:            compilation terminated.
remote:            error: command 'gcc' failed with exit status 1
remote:
remote:            ----------------------------------------
remote:        Command "/app/.heroku/python/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-0o_ywaor/tesseract-ocr/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-kw00rm4e-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-0o_ywaor/tesseract-ocr/
remote:  !     Push rejected, failed to compile Python app.
remote:
remote:  !     Push failed
remote: Verifying deploy...
remote:
remote: !       Push rejected to roboty.
remote:
Amoki commented 5 years ago

Hi!

It's been a long time we didn't use this repo... Have you checked forks? Some of them are more recent than this repo and hadn't submitted a PR. If none of them works, I'll try to see what is happening :) And if one of them works, submit a PR for the next one who struggles with it ;)

kevin1061517 commented 5 years ago

Thank!! I got it . I finally one of them works and I write some notes in my repo. By the way,I am a novice at github. I'm constantly learning from your repo or other master!!