Open hiyamgh opened 4 years ago
The problem is that ocropy needs Python 2.7 but numpy and scipy newest versions dropped Python 2.7 support.
@zuphilip,
Maybe you can add the needed changes for 3.6+ support from: https://github.com/kba/ocropy/commits/master
@amitdo So now what I need to do is download older versions of numpy and scipy to work ?
I don't know. I don't think it's a good idea to use Python 2.7 anymore.
Let's wait for @zuphilip response.
For anyone who stumbles upon this in the future, as @amitdo said ocropy needs Python 2.7 but numpy and scipy newest versions dropped Python 2.7 support.
However, you can still use them but the problem is that our developer folks will stop supporting bug fixes.
My problem was mainly the global version of Python I have on my system (windows) is 3.6.7
while ocropus requires 2.7
. I downloaded a broken executable for Python 2.7
that did not have the Scripts folder installed, thus pip ended up not working at all.
Followed this tutorial that shows how to install another version of python (2.7) and the problem was solved when I downloaded the following executable
In order to use thevirtualenv
properly with python 2.7
use the following command
# dont forget to add python.exe
virtualenv -p C:\Python27\python.exe venv/ocropus
I will not close this issue now, will be waiting for @zuphilip to see if support will be added for newer python versions because its better off.
Goodluck.
or in ubuntu 18.04, install tesseract, then gImageReader with a nice gui. One day, when this works with Python 3.x I can retest this again, thanks, have fun reading.
As for Python 3.x support: There have been a few efforts, including a PR from last year that wasn't ultimately merged.
The best ocropy variant is currently @bertsky's fork that is part of @cisocrgroup's ocrd_cis
. This fork incorporates not only the python3 compatibililty but various other improvements. This is the version that I want to merge into upstream as soon as time and projects' progress permit.
Thanks for the hint, what would be its advantages compared to tesseract + gImageReader for example? Do you have a few interesting cases? Thanks in advance.
I have used Python 2.7 virtual environment for installing
requirements.txt
But I got the following:So I ended up using Pythn 3.6.
I was able with
python 3.6
to installrequirements.txt
but when I try now to installsetu.py
I get the following error:So how can I use
python 2.7
and I'm not able to install therequirements.txt
for it ?