Help with installing

144 views
Skip to first unread message

Philip Gwyn

unread,
Oct 23, 2015, 5:26:24 PM10/23/15
to ocropus
I am running on CentOS 6.
I installed python 2.7 as per http://developerblog.redhat.com/2013/02/14/setting-up-django-and-python-2-7-on-red-hat-enterprise-6-the-easy-way/
I used pip to install numpy scipy nose sympy pandas matplotlib beautifulsoup4 Pillow-PIL
I have numpy version 1.10.1

ocropus-nlbin fails because im.tostring() is now im.tobytes().  This is an easy fix.
ocropus-gpageseg fails with :
Traceback (most recent call last):
  File "ocropus-gpageseg", line 431, in safe_process1
    process1(job)
  File "ocropus-gpageseg", line 387, in process1
    segmentation = compute_segmentation(binary,scale)
  File "ocropus-gpageseg", line 322, in compute_segmentation
    seeds = compute_line_seeds(binary,bottom,top,colseps,scale)
  File "ocropus-gpageseg", line 271, in compute_line_seeds
    bmarked *= (bottom>t*amax(bottom)*t)*(1-colseps)
TypeError: Cannot cast ufunc multiply output from dtype('int32') to dtype('bool') with casting rule 'same_kind'

This is much harder to fix given I know little about python and numby.  I tried to rewrite the line with a liberal sprinkling of .astype(float64) but the resulting .png is blank.

Philip Gwyn

unread,
Oct 24, 2015, 12:44:12 PM10/24/15
to ocropus
Turns out I was looking in the wrong place.  With copious .astype(float64) I can gpageseg to work.

Bruce Zhang

unread,
Jan 29, 2016, 2:00:09 AM1/29/16
to ocropus
What is that mean, and how exactly did you fix this ? I got the same error on Ubuntu too.

在 2015年10月25日星期日 UTC+8上午12:44:12,Philip Gwyn写道:
Reply all
Reply to author
Forward
0 new messages