Giter VIP home page Giter VIP logo

Comments (18)

cneud avatar cneud commented on June 2, 2024

Hi Ignacio!

Yes this is quite painful. See also OCR-D/ocrd_all#219, OCR-D/ocrd_all#235 - these are getting more.

A problem with migrating to TF2 is that besides API changes, it appears models will need to be re-trained (takes weeks for some models in our case), then tested for regressions etc.

So it is on our agenda, but don't expect a very quick solution. Sorry :/

from eynollah.

kba avatar kba commented on June 2, 2024

If you want to try out more OCR-D tools, then you're really best of with a dedicated Python 3.7 environment for that because there are other processors that will not work with 3.8. And since tensorflow decided not to build tensorflow 1.15 packages for python 3.8, we're pretty much stuck at 3.7 until we find the time and resources to retrain&upgrade all the tools, which as @cneud noted, might be a long while.

from eynollah.

stweil avatar stweil commented on June 2, 2024

https://github.com/OCR-D/ocrd-website/wiki/OCR-D-on-Debian-and-Ubuntu#installation-of-python-37 has instructions for installing Python 3.7.

from eynollah.

jbarth-ubhd avatar jbarth-ubhd commented on June 2, 2024

I'm trying to install it with Ubuntu 18.04 (fresh schroot, native) with python 3.6, python 3.7 - no combination works:

# python3.7 -m pip install .
Could not find a version that satisfies the requirement tensorflow-gpu<2,>=1.15 (from eynollah==0.0.1) (from versions: 1.13.1, 1.13.2, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow-gpu<2,>=1.15 (from eynollah==0.0.1)

# python3.6 -m pip install .
Could not find a version that satisfies the requirement tensorflow-gpu<2,>=1.15 (from eynollah==0.0.1) (from versions: 0.12.1, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.3.0, 1.4.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.7.0, 1.7.1, 1.8.0, 1.9.0, 1.10.0, 1.10.1, 1.11.0, 1.12.0, 1.12.2, 1.12.3, 1.13.1, 1.13.2, 1.14.0, 2.0.0a0, 2.0.0b0, 2.0.0b1)
No matching distribution found for tensorflow-gpu<2,>=1.15 (from eynollah==0.0.1)

from eynollah.

cneud avatar cneud commented on June 2, 2024

@jbarth-ubhd Which version of pip are you using - or can you update pip and try again? tensorflow-gpu 1.15.5 is available on pypi: https://pypi.org/project/tensorflow-gpu/1.15.5/

from eynollah.

jbarth-ubhd avatar jbarth-ubhd commented on June 2, 2024

python3.7 -m pip list | grep pip: pip (9.0.1)

from eynollah.

cneud avatar cneud commented on June 2, 2024

That's a bit too old ;-) Can you try to update pip? I think a version of pip >19 is needed to find/fetch tensorflow-gpu 1.15.5.

from eynollah.

jbarth-ubhd avatar jbarth-ubhd commented on June 2, 2024

That's Ubuntu 18.04 :-)

from eynollah.

jbarth-ubhd avatar jbarth-ubhd commented on June 2, 2024

python3.7 -m pip install --upgrade pip helped.

from eynollah.

jbarth-ubhd avatar jbarth-ubhd commented on June 2, 2024

Thanks!

from eynollah.

jbarth-ubhd avatar jbarth-ubhd commented on June 2, 2024

could something like pip > 19 be added to requirements.txt?

from eynollah.

kba avatar kba commented on June 2, 2024

could something like pip > 19 be added to requirements.txt?

It could but then you still have to run it twice because the first time round you're still using the old pip. It's a good idea in general to do pip install -U pip after a fresh install or a in a fresh venv. In ocrd_all it's part of the Makefile, so as soon as eynollah is part of ocrd_all, that would be the recommended way to install it.

from eynollah.

mikegerber avatar mikegerber commented on June 2, 2024

I'd like to note that when creating a Python virtualenv, you can specify the Python interpreter to use, i.e.:

virtualenv -p /usr/bin/python3.7 /tmp/venv-example

or, using mkvirtualenv (if you happen to prefer virtualenvwrapper, like me):

mkvirtualenv -p /usr/bin/python3.7 venv-example

My Linux system (Fedora Linux 32) offers to install older Python interpreters like Python 3.7 in addition to the default version (3.8), so this method is easily available to me.

from eynollah.

mikegerber avatar mikegerber commented on June 2, 2024

could something like pip > 19 be added to requirements.txt?

It could but then you still have to run it twice because the first time round you're still using the old pip. It's a good idea in general to do pip install -U pip after a fresh install or a in a fresh venv. In ocrd_all it's part of the Makefile, so as soon as eynollah is part of ocrd_all, that would be the recommended way to install it.

I agree with @kba. I would consider upgrading pip a best practice to do before anything else and the addition to requirements.txt doesn't help in most cases (I would even say it doesn't help in any case).

from eynollah.

bencomp avatar bencomp commented on June 2, 2024

Could you maybe add a note to the README about supported Python version(s)? And perhaps update the setup.py file too? I spent some time trying to install and run eynollah, only to now find out that the errors may have come from using Python 3.8 and newer through this issue.

Or is this no longer an issue?

from eynollah.

cneud avatar cneud commented on June 2, 2024

Hi @bencomp! I'll make a note to update the README and setup.py - but actually the current master branch should in principle also work with Python 3.8, since we upgraded the tensorflow 1.x dependency that was mainly causing this. Can you share more details on the issues you encountered and perhaps make a new issue for that?

from eynollah.

bencomp avatar bencomp commented on June 2, 2024

Thanks, @cneud! Indeed installing went fine on Python 3.10 and 3.8, so my issue has nothing to do with the Python version. I'll look into opening a new issue.

from eynollah.

cneud avatar cneud commented on June 2, 2024

Since the original problem was solved by the upgrade to tf2, this has not been an issue anymore.

The supported Python version has also been added to the readme. We will deal with Python >3.8 asap, but I will close here.

from eynollah.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.