You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tika.apache.org by "Peter Kronenberg (Jira)" <ji...@apache.org> on 2021/01/05 23:35:00 UTC

[jira] [Comment Edited] (TIKA-3260) Update rotation.py to work with python3 and a more modern matplotlib

    [ https://issues.apache.org/jira/browse/TIKA-3260?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17259284#comment-17259284 ] 

Peter Kronenberg edited comment on TIKA-3260 at 1/5/21, 11:34 PM:
------------------------------------------------------------------

More info for the documentation

Maybe this will help somebody.  I just spent the last day trying to resolve all the dependencies needed for a Linux Docker image.  Here's what I came up with
{code:java}
FROM openjdk:8-jre-alpine
RUN apk add --no-cache tesseract-ocr python3 py3-numpy imagemagick python3-tkinter && \
  pip3 --no-cache-dir install --upgrade pip setuptools wheel && \
  apk add --no-cache --virtual .build-deps gcc g++ zlib-dev make python3-dev py-numpy-dev jpeg-dev gfortran lapack-dev && \
  pip3 --no-cache-dir install scikit-image && \
  apk del --no-cache .build-deps
{code}
 

Also, this is the test that Tika does internally to ensure that all the dependencies are there

 python3 -c "import numpy, matplotlib, skimage, _tkinter;"

If you don't get any errors, then you're good


was (Author: peterkronenberg):
More info for the documentation 

Maybe this will help somebody.  I just spent the last day trying to resolve all the dependencies needed for a Linux Docker image.  Here's what I came up with

 
{code:java}
FROM openjdk:8-jre-alpine
RUN apk add --no-cache tesseract-ocr python3 py3-numpy imagemagick python3-tkinter && \
  pip3 --no-cache-dir install --upgrade pip setuptools wheel && \
  apk add --no-cache --virtual .build-deps gcc g++ zlib-dev make python3-dev py-numpy-dev jpeg-dev gfortran lapack-dev && \
  pip3 --no-cache-dir install scikit-image && \
  apk del --no-cache .build-deps
{code}
 

 

Also, this is the test that Tika does internally to ensure that all the dependencies are there

 
{code:java}
python3 -c "import numpy, matplotlib, skimage, _tkinter;"{code}
If you don't get any errors, then you're good

 

> Update rotation.py to work with python3 and a more modern matplotlib
> --------------------------------------------------------------------
>
>                 Key: TIKA-3260
>                 URL: https://issues.apache.org/jira/browse/TIKA-3260
>             Project: Tika
>          Issue Type: Improvement
>            Reporter: Tim Allison
>            Priority: Major
>         Attachments: apache-tika-8408777197187584954.png, skewed5_image_text.png
>
>
> When I tried to work with rotation.py, I found that we should allow python to be python3 (not require an alias), and I found that rms_flat (once deprecated) has actually been removed in recent versions of matplotlib.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)