GithubHelp home page GithubHelp logo

heroku-buildpack-tesseract's Introduction

heroku-buildpack-tesseract

Added the libraries to use Tesseract 3.02.02 on Heroku

This buildpack is built to be used through heroku-buildpack-multi. In your app you need to:

heroku config:set BUILDPACK_URL=https://github.com/ddollar/heroku-buildpack-multi

Then, create a .buildpacks file inside your app:

https://github.com/heroku/_YOUR_MAIN_BUILDPACK
https://github.com/ddollar/heroku-buildpack-apt
https://github.com/Papiel/heroku-buildpack-tesseract

Then creata a Aptfile file inside your app:

tesseract-ocr

See the documentation of heroku-build-multi for a detailed explanation how to use it.

License

MIT License. Copyright 2013 Marco Azimonti.

heroku-buildpack-tesseract's People

Contributors

amoki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

heroku-buildpack-tesseract's Issues

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

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:

bin/release outputs garbage which Heroku used to ignore but now craps out on

Using this buildpack now results in the following error message during deployment:

remote:  !     Push failed: failed to read buildpack metadata: string not matched
remote:  !     Please try pushing again.
remote:  !     If the problem persists, see http://help.heroku.com/ and provide Request ID e6a4b3b6-278e-4ab1-b113-a7187dc5b683.

This is because bin/release is supposed to output YAML but it just outputs the line release. The script can safely be omitted.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.