Package Details: ocropy-git 998.fe78a04-1

Git Clone URL: (read-only, click to copy)
Package Base: ocropy-git
Description: Python-based OCR package using recurrent neural networks (formerly ocropus)
Upstream URL:
Licenses: Apache
Conflicts: ocropy
Provides: ocropy
Submitter: stativ
Maintainer: patlefort
Last Packager: patlefort
Votes: 12
Popularity: 0.000000
First Submitted: 2015-02-22 20:53 (UTC)
Last Updated: 2022-06-23 09:57 (UTC)

Latest Comments

patlefort commented on 2022-06-23 09:55 (UTC)

I've updated the dependencies. If you had python2-imaging installed, you will have to uninstalled it first as it conflict with python2-pillow.

MarsSeed commented on 2022-06-23 09:06 (UTC)

Also, python2-pytables is no longer a requirement (since 10 Nov 2016).

MarsSeed commented on 2022-06-23 08:58 (UTC)

The image processing dependency should be python2-pillow, not python2-imaging (as per requirements.txt).

allexj commented on 2022-02-11 14:50 (UTC)

-> Could not find all required packages: python2-pluggy (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-atomicwrites (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-funcsigs (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-pathlib2 (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-importlib-metadata (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-setuptools-scm (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-setuptools-scm (Wanted by: ocropy-git -> python2-matplotlib -> python2-dateutil) python2-backports.functools_lru_cache (Wanted by: ocropy-git -> python2-matplotlib) python2-wxpython (Wanted by: ocropy-git -> python2-matplotlib) python2-cairocffi (Wanted by: ocropy-git -> python2-matplotlib) python2-py (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-more-itertools (Wanted by: ocropy-git -> python2-scipy -> python2-pytest) python2-wcwidth (Wanted by: ocropy-git -> python2-scipy -> python2-pytest)

dark-saber commented on 2020-06-10 13:46 (UTC) now gives 404 and probably should be replaced with per

cmsigler commented on 2020-06-01 16:32 (UTC)

Hi, all,

Patch to bring PKGBUILD up to date:

NOTE: To get python2-scipy to build from AUR, that PKGBUILD also needs patching:

This WFM. HTH :^)

Clemmitt Sigler

zaidan commented on 2020-04-08 21:25 (UTC) (edited on 2020-04-08 21:26 (UTC) by zaidan)

@stativ @grunix fixed missing dependencies:

@dreieck @stativ here is a PKGBUILD with major version number:

# Maintainer: Lukas Jirkovsky <>
# Contributor: Firas Zaidan <>

pkgdesc="Python-based OCR package using recurrent neural networks (formerly ocropus)"
depends=('python-imaging' 'python2-scipy' 'python2-matplotlib' 'python2-pytables'
         'imagemagick' 'opencv' 'python2-beautifulsoup4')

pkgver() {
  cd "$srcdir/ocropy"
  echo $(git describe --tag | sed s/-/./g)

prepare() {
  cd "$srcdir/ocropy"
  cp "$srcdir/en-default.pyrnn.gz" models

build() {
  cd "$srcdir/ocropy"

  # make sure python2 is always used
  find . -type f -name "*.py" -exec sed -i 's|^#!.*python$|&2|' '{}' ';'
  sed -i 's|^#!.*python$|&2|' ocropus-*
  sed -i 's|/usr/local|/usr|' ocrolib/
  sed -i 's|/usr/local|/usr|' ocrolib/
  # build
  python2 build

package() {
  cd "$srcdir/ocropy"

  python2 install --root="$pkgdir/" --optimize=1

# vim:set ts=2 sw=2 et:

grunix commented on 2020-01-24 15:12 (UTC)

Package can't be installed any longer because of missing dependency:

==> Error: Could not find all required packages: python2-pytables (Wanted by: ocropy)

dreieck commented on 2019-01-30 14:30 (UTC)

Is it possible to change the $pkgver()-function such that the first part of the $pkgver will be the major version number, and then something like +$'revision'.git-hash or so?

And if that was possible, append a =${pkgver} to the provides=(ocropy)-entry?

stativ commented on 2015-02-22 20:59 (UTC)

According to the project changes, the package has been merged into ocropy-git.

stativ commented on 2015-02-22 20:58 (UTC)

According to the project changes, the package has been merged into ocropy-git.

stativ commented on 2015-02-22 20:58 (UTC)

According to the project changes, the package has been merged into ocropy-git.

stativ commented on 2015-02-22 20:58 (UTC)

According to the project changes, the package has been merged into ocropy-git.

stativ commented on 2015-02-22 20:36 (UTC)

ocroswig no longer exists, it has been replaced by ocropy.

xelvet commented on 2014-09-11 23:21 (UTC)

Continue building ocropus-data-hg ? [Y/n] patching file ocroinst Hunk #1 FAILED at 5. 1 out of 1 hunk FAILED -- saving rejects to file ocroinst.rej ==> ERROR: A failure occurred in build(). Aborting...

cman commented on 2012-11-06 18:42 (UTC)

Ocropus has a new installation process now.

giniu commented on 2012-09-11 10:27 (UTC)

I moved python-pytables to community, at the same time I took the chance to fix the name, thus it is now named python2-pytables and as temporary solution, it provides python-pytables. I will remove the provides when packages depending on it will be updated, because it is python2 only package. Please take time to update your package to depend on python2-pytables instead. Thanks.

commented on 2012-06-20 17:15 (UTC)

thanks, fixed

commented on 2012-06-14 16:19 (UTC)

pytables & scipy dependencies are missing

commented on 2012-06-13 10:39 (UTC)

Fixed, thanks for reporting. It remains a mystery how could it work for me before :)

commented on 2012-06-12 13:40 (UTC)

The same error here: Unable to find 'iulib.i'

commented on 2012-06-11 16:42 (UTC)

I get the following error when trying to build ocropus-hg 46-2: g++ -I/tmp/yaourt-tmp-dnoskov/aur-ocropus-hg/pkg/usr/include -L/tmp/yaourt-tmp-dnoskov/aur-ocropus-hg/pkg/usr/lib -fPIC -g -O4 -c -o pagesegs.o ar cr libocrorast.a wrappers.o line-info.o linesegs.o log-reg-data.o ocr-char-stats.o ocr-classify-zones.o ocr-color-encode-layout.o ocr-ctextline-rast-extended.o ocr-ctextline-rast.o ocr-deskew-rast.o ocr-detect-columns.o ocr-detect-paragraphs.o ocr-doc-clean-concomp.o ocr-doc-clean.o ocr-extract-gutters.o ocr-extract-rulings.o ocr-layout-1cp.o ocr-layout-rast.o ocr-layout-rast1.o ocr-layout-smear.o ocr-noisefilter.o ocr-pageframe-rast.o ocr-pageseg-wcuts.o ocr-pageseg-xycut.o ocr-reading-order.o ocr-segmentations.o ocr-text-image-seg.o ocr-utils.o ocr-visualize-layout-rast.o ocr-whitespace-cover.o ocr-word-segmentation.o pagesegs.o running build_ext building '_ocrorast' extension swigging ocrorast.i to ocrorast_wrap.cpp swig -python -c++ -I/usr/local/include -I/usr/lib/python2.7/site-packages/numpy/core/include -o ocrorast_wrap.cpp ocrorast.i ocrorast.i:67: Error: Unable to find 'iulib.i' error: command 'swig' failed with exit status 1

commented on 2012-06-08 13:10 (UTC)

Updated to reflect changes in 0.5. The model files are now in ocropus-data-hg package. For some reason, just doing "ocropus foo.png" doesn't produce hOCR output for me, even though it supposedly runs ocropus-hocr. But manually running ocropus-hocr afterwards works, for example: "ocropus-hocr _book-018961", where _book-018961 is the temp directory that ocropus created.

jmx commented on 2012-05-12 12:05 (UTC)

I receive the same build error as PaterSiuls did. Any suggestions how to proceed?

PaterSiul commented on 2012-04-10 17:00 (UTC)

DoDoENTs tip let me compile iulib as expected, but now there is a problem with ocrorast: In member function 'void ReadingOrderByTopologicalSort::sortTextlines(colib::narray<TextLine>&, colib::rectarray&, colib::rectarray&, colib::rectarray&, CharStats&)': error: redeclaration of 'line l' error: 'int l' previously declared here make: *** [ocr-reading-order.o] Error 1

DoDoENT commented on 2012-04-03 14:34 (UTC)

In package iulib, file SConstruct: change line 64 from: assert conf.CheckLibWithHeader('tiff', 'tiff.h', 'C', 'TIFFHeader;', 1), "please install: libtiff4-dev" to: assert conf.CheckLibWithHeader('tiff', 'tiff.h', 'C', 'TIFFHeaderCommon;', 1), "please install: libtiff4-dev" Build with scons (not with scons sdl=1). Worked for me for building iulib (haven't tried building ocropus yet).

commented on 2012-04-03 11:11 (UTC)

Confirmed. The problem is, after this is fixed, it still doesn't compile... Unfortunately, I don't have time for this now.

PaterSiul commented on 2012-04-03 11:08 (UTC)

iulib doesn't compile. Message is: scons: Reading SConscript files ... compiling with high optimization Checking for png_byte in C library png... yes Checking for jpeg_std_error() in C library jpeg... yes Checking for TIFFHeader in C library tiff... no AssertionError: please install: libtiff4-dev: File "/tmp/yaourt-tmp-user/aur-ocropus-hg/src/ocropus-build/iulib/SConstruct", line 64: assert conf.CheckLibWithHeader('tiff', 'tiff.h', 'C', 'TIFFHeader;', 1), "please install: libtiff4-dev" It seems to be a problem with Arch's bleeding edge approach in combination with a dependency on an old version of libtiff in iulib: our tiff.h no longer has TIFFHeader but TIFFHeaderCommon, -Classic and -Big.

commented on 2011-12-15 09:20 (UTC)

Thanks for the suggestions. I'll try to figure out what models work and install only them. At least default.cmodel should work.

chenxiaolong commented on 2011-12-14 17:52 (UTC)

@solstice: Could you post your PKGBUILD at a site, like ? I'll see if I can get it working.

solsticedhiver commented on 2011-12-14 15:05 (UTC)

I am trying to follow but I can't run ocropus-lattices because there is no model installed I modified the PKGBUILD to install ocropy/models Now it complains not finding them because it looks in /usr/local/share... I changed /usr/lib/python2.7/site-packages/ocrolib/ to look into /usr/share instead now it tries to load ocropus module that does not exist !! I give up! Is anyone using this thing ? the maintainer ? how ?

solsticedhiver commented on 2011-12-14 14:25 (UTC)

python2-matplotlib and python2-scipy are needed as dependancies and python2 is not needed as a dep because all python2-* package will bring up that dependancy

chenxiaolong commented on 2011-10-18 19:56 (UTC)

Works perfectly now :D Thank you!

commented on 2011-10-18 18:01 (UTC)

OK, I think I fixed that. Thank you for catching it and for the dependencies. Could you please try this version?

chenxiaolong commented on 2011-10-18 17:43 (UTC) needs iulib to compile, but the package also contains files from iulib.

chenxiaolong commented on 2011-10-18 17:13 (UTC)

Could you please add python2-numpy and sdl_gfx to the dependencies? Also, why is iulib-hg in the conflicts array? I get the following error about missing iulib when compiling: AssertionError: : File "/tmp/yaourt-tmp-chenxiaolong/aur-ocropus-hg/src/ocropus-build/ocrofst/SConstruct", line 106: assert conf.CheckLibWithHeader("iulib","iulib/iulib.h","C++");

commented on 2011-10-14 00:34 (UTC)

Updated after the big reorganization of 9 Oct 2011 ( All the ocropus subprojects are now in subrepos. This probably will result in havoc since makepkg sees only the main repo's version. As the result, the version dropped from 300+ to 14, but this is not the worst problem. The worst is that the version won't bump when subrepos update. Almost all of the weird packages (iulib, ocroswig, ocropy, ocrofst) are now obsolete. It doesn't make sense to track ocropus internal structure with Arch's packaging system. The only separate package remaining is pyopenfst. Some stuff that this package installs doesn't work. The interesting commands are ocropus-{binarize,pseg,lattice,align,hocr}.

commented on 2010-10-26 21:34 (UTC)

The patch is not needed anymore. Also, python3 happened. Here's my new version:

commented on 2010-06-11 15:52 (UTC)

Unfortunately, it's not the only problem. Here's another patch it needs: But even after both patches it doesn't work.

mutantmonkey commented on 2010-06-10 15:23 (UTC)

I needed this patch to get ocropus-hg to compile: I believe it's an upstream problem, but could you please add this to your PKGBUILD as a temporary workaround?

commented on 2010-05-11 10:36 (UTC)

OK, the patches are there. Here's my version of PKGBUILD:

commented on 2010-04-29 17:05 (UTC)

Hi, I maintain iulib-hg and I planned to put out ocropus-hg when some patches will be accepted upstream. Here are some suggestions: iulib-hg is not a makedepend. ocropus additionally depends on giflib and sqlite3. Consider using namcap to check packages for dependency errors. This: scons prefix="$pkgdir/usr" sdl=1 || return 1 scons prefix="$pkgdir/usr" sdl=1 install || return 1 worked for iulib, because $pkgdir is remembered nowhere in the packaged files. However, it's not a good idea for ocropus, because the prefix is meant to be compiled into Right now, this mechanism has a bug, and that is exactly what I was waiting for to be fixed. Now ocropus always looks into /usr/local, but once this is patched, the correct way to build it would be this: scons prefix=/usr destdir="$pkgdir" install || return 1 Keep the packages coming! Cheers