ocropus-archive / DUP-ocropy

Python-based tools for document analysis and OCR
Apache License 2.0
3.41k stars 590 forks source link

AtributeError: clstm.make_BIDILSTM - ocropy-rtrain #305

Closed bugsyb closed 6 years ago

bugsyb commented 6 years ago

Reporting back on issue - trying to run ocopus-rtrain with "-C" to use clstmocrtrain.

Traceback (most recent call last):
  File "/hom/user/ocropy/ocropus-rtrain", line 201, in <module>
    network = load_lstm(args.load)
  File "/hom/user/ocropy/ocropus-rtrain", line 187, in load_lstm
    mylstm = clstm.make_BIDILSTM()
AttributeError: 'module' object has no attribute 'make_BIDILSTM'

Clstm is compiled with gpu=1 and installed. Additionally following lstm related files are found (maybe this is the issue? (yes, I'm experimenting with kraken too, but wanted to make clstmocrtrain working and have it used by ocropy-rtrain.

find /usr -iname "*lstm*"
/usr/local/include/clstm.h
/usr/local/lib/python2.7/dist-packages/.libs_clstm
/usr/local/lib/python2.7/dist-packages/clstm-0.0.5.dist-info
/usr/local/lib/python2.7/dist-packages/kraken/lib/lstm.py
/usr/local/lib/python2.7/dist-packages/kraken/lib/lstm.pyc
/usr/local/lib/python2.7/dist-packages/kraken/script.clstm
/usr/local/lib/python2.7/dist-packages/ocrolib/lstm.py
/usr/local/lib/python2.7/dist-packages/ocrolib/lstm.pyc
/usr/local/lib/python2.7/dist-packages/clstm.py_backup_20180330
/usr/local/lib/python2.7/dist-packages/_clstm.so
/usr/local/lib/python2.7/dist-packages/clstm.py
/usr/local/lib/python2.7/dist-packages/clstm.pyc
/usr/local/lib/python2.7/dist-packages/clstm-0.0.egg-info
/usr/local/lib/python3.5/dist-packages/__pycache__/clstm.cpython-35.pyc
/usr/local/lib/python3.5/dist-packages/_clstm.cpython-35m-x86_64-linux-gnu.so
/usr/local/lib/python3.5/dist-packages/clstm.py
/usr/local/lib/python3.5/dist-packages/clstm-0.0.5.dist-info
/usr/local/lib/python3.5/dist-packages/.libs_clstm
/usr/local/lib/python3.5/dist-packages/kraken/script.clstm
/usr/local/lib/python3.5/dist-packages/kraken/lib/lstm.py
/usr/local/lib/python3.5/dist-packages/kraken/lib/__pycache__/lstm.cpython-35.pyc
/usr/local/lib/libclstm.a

Importing clstm:

>>> import clstm
# /usr/local/lib/python2.7/dist-packages/clstm.pyc matches /usr/local/lib/python2.7/dist-packages/clstm.py
import clstm # precompiled from /usr/local/lib/python2.7/dist-packages/clstm.pyc
import imp # builtin
dlopen("/usr/local/lib/python2.7/dist-packages/_clstm.so", 2);
import numpy # directory /home/someuser/.local/lib/python2.7/site-packages/numpy
# /home/someuser/.local/lib/python2.7/site-packages/numpy/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/__init__.py
import numpy # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/__init__.pyc
# /usr/lib/python2.7/__future__.pyc matches /usr/lib/python2.7/__future__.py
import __future__ # precompiled from /usr/lib/python2.7/__future__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/_globals.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/_globals.py
import numpy._globals # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/_globals.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/__config__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/__config__.py
import numpy.__config__ # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/__config__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/version.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/version.py
import numpy.version # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/version.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/_import_tools.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/_import_tools.py
import numpy._import_tools # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/_import_tools.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/add_newdocs.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/add_newdocs.py
import numpy.add_newdocs # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/add_newdocs.pyc
import numpy.lib # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/lib
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/__init__.py
import numpy.lib # precompiled from /home/someuser/.local/lib/python2.7/site-paasd
asdasdckages/numpy/lib/__init__.pyc
import math # builtin
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/info.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/info.py
import numpy.lib.info # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/info.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/type_check.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/type_check.py
import numpy.lib.type_check # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/type_check.pyc
import numpy.core # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/core
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/__init__.py
import numpy.core # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/info.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/info.py
import numpy.core.info # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/info.pyc
dlopen("/home/someuser/.local/lib/python2.7/site-packages/numpy/core/multiarray.so", 2);
import datetime # builtin
import numpy.core.multiarray # dynamically loaded from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/multiarray.so
dlopen("/home/someuser/.local/lib/python2.7/site-packages/numpy/core/umath.so", 2);
import numpy.core.umath # dynamically loaded from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/umath.so
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/_internal.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/_internal.py
import numpy.core._internal # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/_internal.pyc
import numpy.compat # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/compat
# /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/__init__.py
import numpy.compat # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/_inspect.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/_inspect.py
import numpy.compat._inspect # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/_inspect.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/py3k.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/py3k.py
import numpy.compat.py3k # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/compat/py3k.pyc
import ctypes # directory /usr/lib/python2.7/ctypes
# /usr/lib/python2.7/ctypes/__init__.pyc matches /usr/lib/python2.7/ctypes/__init__.py
import ctypes # precompiled from /usr/lib/python2.7/ctypes/__init__.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so", 2);
import _ctypes # dynamically loaded from /usr/lib/python2.7/lib-dynload/_ctypes.x86_64-linux-gnu.so
# /usr/lib/python2.7/struct.pyc matches /usr/lib/python2.7/struct.py
import struct # precompiled from /usr/lib/python2.7/struct.pyc
import _struct # builtin
# /usr/lib/python2.7/ctypes/_endian.pyc matches /usr/lib/python2.7/ctypes/_endian.py
import ctypes._endian # precompiled from /usr/lib/python2.7/ctypes/_endian.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/numerictypes.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/numerictypes.py
import numpy.core.numerictypes # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/numerictypes.pyc
# /usr/lib/python2.7/numbers.pyc matches /usr/lib/python2.7/numbers.py
import numbers # precompiled from /usr/lib/python2.7/numbers.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/numeric.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/numeric.py
import numpy.core.numeric # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/numeric.pyc
# /usr/lib/python2.7/collections.pyc matches /usr/lib/python2.7/collections.py
import collections # precompiled from /usr/lib/python2.7/collections.pyc
import _collections # builtin
import operator # builtin
# /usr/lib/python2.7/keyword.pyc matches /usr/lib/python2.7/keyword.py
import keyword # precompiled from /usr/lib/python2.7/keyword.pyc
# /usr/lib/python2.7/heapq.pyc matches /usr/lib/python2.7/heapq.py
import heapq # precompiled from /usr/lib/python2.7/heapq.pyc
import itertools # builtin
import _heapq # builtin
import thread # builtin
import cPickle # builtin
import cStringIO # builtin
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/arrayprint.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/arrayprint.py
import numpy.core.arrayprint # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/arrayprint.pyc
# /usr/lib/python2.7/functools.pyc matches /usr/lib/python2.7/functools.py
import functools # precompiled from /usr/lib/python2.7/functools.pyc
import _functools # builtin
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/fromnumeric.py
import numpy.core.fromnumeric # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/fromnumeric.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/_methods.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/_methods.py
import numpy.core._methods # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/_methods.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/defchararray.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/defchararray.py
import numpy.core.defchararray # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/defchararray.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/records.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/records.py
import numpy.core.records # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/records.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/memmap.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/memmap.py
import numpy.core.memmap # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/memmap.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/function_base.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/function_base.py
import numpy.core.function_base # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/function_base.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/machar.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/machar.py
import numpy.core.machar # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/machar.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/getlimits.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/getlimits.py
import numpy.core.getlimits # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/getlimits.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/shape_base.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/shape_base.py
import numpy.core.shape_base # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/shape_base.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/core/einsumfunc.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/core/einsumfunc.py
import numpy.core.einsumfunc # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/core/einsumfunc.pyc
import numpy.testing # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/testing
# /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/__init__.py
import numpy.testing # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/__init__.pyc
import unittest # directory /usr/lib/python2.7/unittest
# /usr/lib/python2.7/unittest/__init__.pyc matches /usr/lib/python2.7/unittest/__init__.py
import unittest # precompiled from /usr/lib/python2.7/unittest/__init__.pyc
# /usr/lib/python2.7/unittest/result.pyc matches /usr/lib/python2.7/unittest/result.py
import unittest.result # precompiled from /usr/lib/python2.7/unittest/result.pyc
# /usr/lib/python2.7/StringIO.pyc matches /usr/lib/python2.7/StringIO.py
import StringIO # precompiled from /usr/lib/python2.7/StringIO.pyc
# /usr/lib/python2.7/unittest/util.pyc matches /usr/lib/python2.7/unittest/util.py
import unittest.util # precompiled from /usr/lib/python2.7/unittest/util.pyc
# /usr/lib/python2.7/unittest/case.pyc matches /usr/lib/python2.7/unittest/case.py
import unittest.case # precompiled from /usr/lib/python2.7/unittest/case.pyc
# /usr/lib/python2.7/difflib.pyc matches /usr/lib/python2.7/difflib.py
import difflib # precompiled from /usr/lib/python2.7/difflib.pyc
# /usr/lib/python2.7/pprint.pyc matches /usr/lib/python2.7/pprint.py
import pprint # precompiled from /usr/lib/python2.7/pprint.pyc
# /usr/lib/python2.7/unittest/suite.pyc matches /usr/lib/python2.7/unittest/suite.py
import unittest.suite # precompiled from /usr/lib/python2.7/unittest/suite.pyc
# /usr/lib/python2.7/unittest/loader.pyc matches /usr/lib/python2.7/unittest/loader.py
import unittest.loader # precompiled from /usr/lib/python2.7/unittest/loader.pyc
# /usr/lib/python2.7/fnmatch.pyc matches /usr/lib/python2.7/fnmatch.py
import fnmatch # precompiled from /usr/lib/python2.7/fnmatch.pyc
# /usr/lib/python2.7/unittest/main.pyc matches /usr/lib/python2.7/unittest/main.py
import unittest.main # precompiled from /usr/lib/python2.7/unittest/main.pyc
# /usr/lib/python2.7/unittest/runner.pyc matches /usr/lib/python2.7/unittest/runner.py
import unittest.runner # precompiled from /usr/lib/python2.7/unittest/runner.pyc
import time # builtin
# /usr/lib/python2.7/unittest/signals.pyc matches /usr/lib/python2.7/unittest/signals.py
import unittest.signals # precompiled from /usr/lib/python2.7/unittest/signals.pyc
# /usr/lib/python2.7/weakref.pyc matches /usr/lib/python2.7/weakref.py
import weakref # precompiled from /usr/lib/python2.7/weakref.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/decorators.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/decorators.py
import numpy.testing.decorators # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/decorators.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/utils.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/utils.py
import numpy.testing.utils # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/utils.pyc
# /usr/lib/python2.7/shutil.pyc matches /usr/lib/python2.7/shutil.py
import shutil # precompiled from /usr/lib/python2.7/shutil.pyc
import pwd # builtin
import grp # builtin
# /usr/lib/python2.7/contextlib.pyc matches /usr/lib/python2.7/contextlib.py
import contextlib # precompiled from /usr/lib/python2.7/contextlib.pyc
# /usr/lib/python2.7/tempfile.pyc matches /usr/lib/python2.7/tempfile.py
import tempfile # precompiled from /usr/lib/python2.7/tempfile.pyc
# /usr/lib/python2.7/io.pyc matches /usr/lib/python2.7/io.py
import io # precompiled from /usr/lib/python2.7/io.pyc
import _io # builtin
# /usr/lib/python2.7/random.pyc matches /usr/lib/python2.7/random.py
import random # precompiled from /usr/lib/python2.7/random.pyc
import binascii # builtin
# /usr/lib/python2.7/hashlib.pyc matches /usr/lib/python2.7/hashlib.py
import hashlib # precompiled from /usr/lib/python2.7/hashlib.pyc
dlopen("/usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so", 2);
import _hashlib # dynamically loaded from /usr/lib/python2.7/lib-dynload/_hashlib.x86_64-linux-gnu.so
import _random # builtin
import fcntl # builtin
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/utils.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/utils.py
import numpy.lib.utils # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/utils.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/nosetester.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/nosetester.py
import numpy.testing.nosetester # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/testing/nosetester.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/ufunclike.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/ufunclike.py
import numpy.lib.ufunclike # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/ufunclike.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/index_tricks.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/index_tricks.py
import numpy.lib.index_tricks # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/index_tricks.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/function_base.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/function_base.py
import numpy.lib.function_base # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/function_base.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/twodim_base.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/twodim_base.py
import numpy.lib.twodim_base # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/twodim_base.pyc
import numpy.matrixlib # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/matrixlib
# /home/someuser/.local/lib/python2.7/site-packages/numpy/matrixlib/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/matrixlib/__init__.py
import numpy.matrixlib # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/matrixlib/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/matrixlib/defmatrix.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/matrixlib/defmatrix.py
import numpy.matrixlib.defmatrix # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/matrixlib/defmatrix.pyc
# /usr/lib/python2.7/ast.pyc matches /usr/lib/python2.7/ast.py
import ast # precompiled from /usr/lib/python2.7/ast.pyc
import _ast # builtin
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/stride_tricks.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/stride_tricks.py
import numpy.lib.stride_tricks # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/stride_tricks.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/mixins.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/mixins.py
import numpy.lib.mixins # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/mixins.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/nanfunctions.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/nanfunctions.py
import numpy.lib.nanfunctions # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/nanfunctions.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/shape_base.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/shape_base.py
import numpy.lib.shape_base # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/shape_base.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/scimath.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/scimath.py
import numpy.lib.scimath # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/scimath.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/polynomial.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/polynomial.py
import numpy.lib.polynomial # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/polynomial.pyc
import numpy.linalg # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg
# /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/__init__.py
import numpy.linalg # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/info.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/info.py
import numpy.linalg.info # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/info.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/linalg.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/linalg.py
import numpy.linalg.linalg # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/linalg.pyc
dlopen("/home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so", 2);
import numpy.linalg.lapack_lite # dynamically loaded from /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/lapack_lite.so
dlopen("/home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so", 2);
import numpy.linalg._umath_linalg # dynamically loaded from /home/someuser/.local/lib/python2.7/site-packages/numpy/linalg/_umath_linalg.so
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arraysetops.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arraysetops.py
import numpy.lib.arraysetops # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arraysetops.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/npyio.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/npyio.py
import numpy.lib.npyio # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/npyio.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/format.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/format.py
import numpy.lib.format # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/format.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_datasource.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_datasource.py
import numpy.lib._datasource # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_datasource.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_iotools.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_iotools.py
import numpy.lib._iotools # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_iotools.pyc
dlopen("/usr/lib/python2.7/lib-dynload/future_builtins.x86_64-linux-gnu.so", 2);
import future_builtins # dynamically loaded from /usr/lib/python2.7/lib-dynload/future_builtins.x86_64-linux-gnu.so
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/financial.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/financial.py
import numpy.lib.financial # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/financial.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arrayterator.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arrayterator.py
import numpy.lib.arrayterator # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arrayterator.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arraypad.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arraypad.py
import numpy.lib.arraypad # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/arraypad.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_version.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_version.py
import numpy.lib._version # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/lib/_version.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/_distributor_init.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/_distributor_init.py
import numpy._distributor_init # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/_distributor_init.pyc
import numpy.fft # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/fft
# /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/__init__.py
import numpy.fft # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/info.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/info.py
import numpy.fft.info # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/info.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/fftpack.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/fftpack.py
import numpy.fft.fftpack # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/fftpack.pyc
dlopen("/home/someuser/.local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so", 2);
import numpy.fft.fftpack_lite # dynamically loaded from /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/fftpack_lite.so
# /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/helper.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/helper.py
import numpy.fft.helper # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/fft/helper.pyc
# /usr/lib/python2.7/threading.pyc matches /usr/lib/python2.7/threading.py
import threading # precompiled from /usr/lib/python2.7/threading.pyc
import numpy.polynomial # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/__init__.py
import numpy.polynomial # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/polynomial.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/polynomial.py
import numpy.polynomial.polynomial # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/polynomial.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/polyutils.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/polyutils.py
import numpy.polynomial.polyutils # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/polyutils.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/_polybase.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/_polybase.py
import numpy.polynomial._polybase # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/_polybase.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/chebyshev.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/chebyshev.py
import numpy.polynomial.chebyshev # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/chebyshev.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/legendre.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/legendre.py
import numpy.polynomial.legendre # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/legendre.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/hermite.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/hermite.py
import numpy.polynomial.hermite # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/hermite.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/hermite_e.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/hermite_e.py
import numpy.polynomial.hermite_e # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/hermite_e.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/laguerre.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/laguerre.py
import numpy.polynomial.laguerre # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/polynomial/laguerre.pyc
import numpy.random # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/random
# /home/someuser/.local/lib/python2.7/site-packages/numpy/random/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/random/__init__.py
import numpy.random # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/random/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/random/info.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/random/info.py
import numpy.random.info # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/random/info.pyc
dlopen("/home/someuser/.local/lib/python2.7/site-packages/numpy/random/mtrand.so", 2);
import numpy.random.mtrand # dynamically loaded from /home/someuser/.local/lib/python2.7/site-packages/numpy/random/mtrand.so
# /home/someuser/.local/lib/python2.7/site-packages/numpy/ctypeslib.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/ctypeslib.py
import numpy.ctypeslib # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/ctypeslib.pyc
import numpy.ma # directory /home/someuser/.local/lib/python2.7/site-packages/numpy/ma
# /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/__init__.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/__init__.py
import numpy.ma # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/__init__.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/core.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/core.py
import numpy.ma.core # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/core.pyc
# /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/extras.pyc matches /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/extras.py
import numpy.ma.extras # precompiled from /home/someuser/.local/lib/python2.7/site-packages/numpy/ma/extras.pyc
import _clstm # dynamically loaded from /usr/local/lib/python2.7/dist-packages/_clstm.so
>>> 

and python -v:

# installing zipimport hook
import zipimport # builtin
# installed zipimport hook
# /usr/lib/python2.7/site.pyc matches /usr/lib/python2.7/site.py
import site # precompiled from /usr/lib/python2.7/site.pyc
# /usr/lib/python2.7/os.pyc matches /usr/lib/python2.7/os.py
import os # precompiled from /usr/lib/python2.7/os.pyc
import errno # builtin
import posix # builtin
# /usr/lib/python2.7/posixpath.pyc matches /usr/lib/python2.7/posixpath.py
import posixpath # precompiled from /usr/lib/python2.7/posixpath.pyc
# /usr/lib/python2.7/stat.pyc matches /usr/lib/python2.7/stat.py
import stat # precompiled from /usr/lib/python2.7/stat.pyc
# /usr/lib/python2.7/genericpath.pyc matches /usr/lib/python2.7/genericpath.py
import genericpath # precompiled from /usr/lib/python2.7/genericpath.pyc
# /usr/lib/python2.7/warnings.pyc matches /usr/lib/python2.7/warnings.py
import warnings # precompiled from /usr/lib/python2.7/warnings.pyc
# /usr/lib/python2.7/linecache.pyc matches /usr/lib/python2.7/linecache.py
import linecache # precompiled from /usr/lib/python2.7/linecache.pyc
# /usr/lib/python2.7/types.pyc matches /usr/lib/python2.7/types.py
import types # precompiled from /usr/lib/python2.7/types.pyc
# /usr/lib/python2.7/UserDict.pyc matches /usr/lib/python2.7/UserDict.py
import UserDict # precompiled from /usr/lib/python2.7/UserDict.pyc
# /usr/lib/python2.7/_abcoll.pyc matches /usr/lib/python2.7/_abcoll.py
import _abcoll # precompiled from /usr/lib/python2.7/_abcoll.pyc
# /usr/lib/python2.7/abc.pyc matches /usr/lib/python2.7/abc.py
import abc # precompiled from /usr/lib/python2.7/abc.pyc
# /usr/lib/python2.7/_weakrefset.pyc matches /usr/lib/python2.7/_weakrefset.py
import _weakrefset # precompiled from /usr/lib/python2.7/_weakrefset.pyc
import _weakref # builtin
# /usr/lib/python2.7/copy_reg.pyc matches /usr/lib/python2.7/copy_reg.py
import copy_reg # precompiled from /usr/lib/python2.7/copy_reg.pyc
# /usr/lib/python2.7/traceback.pyc matches /usr/lib/python2.7/traceback.py
import traceback # precompiled from /usr/lib/python2.7/traceback.pyc
# /usr/lib/python2.7/sysconfig.pyc matches /usr/lib/python2.7/sysconfig.py
import sysconfig # precompiled from /usr/lib/python2.7/sysconfig.pyc
# /usr/lib/python2.7/re.pyc matches /usr/lib/python2.7/re.py
import re # precompiled from /usr/lib/python2.7/re.pyc
# /usr/lib/python2.7/sre_compile.pyc matches /usr/lib/python2.7/sre_compile.py
import sre_compile # precompiled from /usr/lib/python2.7/sre_compile.pyc
import _sre # builtin
# /usr/lib/python2.7/sre_parse.pyc matches /usr/lib/python2.7/sre_parse.py
import sre_parse # precompiled from /usr/lib/python2.7/sre_parse.pyc
# /usr/lib/python2.7/sre_constants.pyc matches /usr/lib/python2.7/sre_constants.py
import sre_constants # precompiled from /usr/lib/python2.7/sre_constants.pyc
import _locale # builtin
# /usr/lib/python2.7/_sysconfigdata.pyc matches /usr/lib/python2.7/_sysconfigdata.py
import _sysconfigdata # precompiled from /usr/lib/python2.7/_sysconfigdata.pyc
# /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.pyc matches /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.py
import _sysconfigdata_nd # precompiled from /usr/lib/python2.7/plat-x86_64-linux-gnu/_sysconfigdata_nd.pyc
# /usr/lib/python2.7/sitecustomize.pyc matches /usr/lib/python2.7/sitecustomize.py
import sitecustomize # precompiled from /usr/lib/python2.7/sitecustomize.pyc
import encodings # directory /usr/lib/python2.7/encodings
# /usr/lib/python2.7/encodings/__init__.pyc matches /usr/lib/python2.7/encodings/__init__.py
import encodings # precompiled from /usr/lib/python2.7/encodings/__init__.pyc
# /usr/lib/python2.7/codecs.pyc matches /usr/lib/python2.7/codecs.py
import codecs # precompiled from /usr/lib/python2.7/codecs.pyc
import _codecs # builtin
# /usr/lib/python2.7/encodings/aliases.pyc matches /usr/lib/python2.7/encodings/aliases.py
import encodings.aliases # precompiled from /usr/lib/python2.7/encodings/aliases.pyc
# /usr/lib/python2.7/encodings/utf_8.pyc matches /usr/lib/python2.7/encodings/utf_8.py
import encodings.utf_8 # precompiled from /usr/lib/python2.7/encodings/utf_8.pyc
Python 2.7.12 (default, Dec  4 2017, 14:50:18) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
dlopen("/usr/lib/python2.7/lib-dynload/readline.x86_64-linux-gnu.so", 2);
import readline # dynamically loaded from /usr/lib/python2.7/lib-dynload/readline.x86_64-linux-gnu.so
# /usr/lib/python2.7/rlcompleter.pyc matches /usr/lib/python2.7/rlcompleter.py
import rlcompleter # precompiled from /usr/lib/python2.7/rlcompleter.pyc
# /usr/lib/python2.7/atexit.pyc matches /usr/lib/python2.7/atexit.py
import atexit # precompiled from /usr/lib/python2.7/atexit.pyc
zuphilip commented 6 years ago

Your error message indicates that the lines https://github.com/tmbdev/ocropy/blob/d3e5cc60b64d070b60d606a16baeda6b436cc23b/ocropus-rtrain#L186-L187 have a problem. The import should look for a clstm.py, but I can't find that file here. Is this generated by CLSTM? Maybe @kba has some more experience with CLSTM and the bindings here.

kba commented 6 years ago

These are the clstm python bindings. @mittagessen maintains a version on pypi. Installing with pip install clstm should provide them.

mittagessen commented 6 years ago

No they won't. Everything clstm related in ocropy uses an API that was never part of public, running code and is incompatible with my package of the last working separate-derivs branch. Don't use clstm with ocropy. You can train clstm models using the clstmocrtrain tool and use either the distribution's recognition tools or kraken as a recognizer.

kba commented 6 years ago

Thanks for clarifying.