Python Forum
Can't install tensorflow-addons with pip
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Can't install tensorflow-addons with pip
#1
Hi everyone! Smile

I'm trying to use DocTR ocr, and I'm having a lot of issues. Right now I'm not able to install tensorflow-addons. I write the command in the terminal, but nothing happens. It just freezes for a couple of seconds and then it ends without a result. I tried changing python versions but I got the same result with 3.9 and 3.8. I can't use 3.10 as it seems that it has some version incompatibilities with another module that I need to install to be able to use DocTR.
Im not getting an error so I don't know what is going on, but It's not getting installed also. I'd appreciate any help.

Thanks in advance!
Reply
#2
Well, it seems that it WAS getting installed, but didn't show anything because it had a "-q" in the command.
"pip install -q tensorflow-addons"
I removed it and it shows that requirements are already satisfied. I'm still not able to use DocTr.

I get this message:
Quote:ModuleNotFoundError: DocTR requires either TensorFlow or PyTorch to be installed. Please ensure one of them is installed and that either USE_TF or USE_TORCH is enabled.



This is my code:

from doctr.io import DocumentFile
from doctr.models import ocr_predictor


model = ocr_predictor(pretrained=True)
document = DocumentFile.from_images("img2.jpeg")

result = model(document)
result.show(document)
I'm not sure also where to create my "main.py" file, as I had to clone the doctr git repository. I created it inside the doctr project folder.
Reply
#3
A quick look at the docs and I do not see how to enable USE_TF. I believe that is the problem, sorry no solution.
Reply
#4
(Sep-05-2022, 12:38 PM)jefsummers Wrote: A quick look at the docs and I do not see how to enable USE_TF. I believe that is the problem, sorry no solution.

Oh I see. I'll search info about that then. Thank you!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cannot install TensorFlow 2.2 in Windows 10 Led_Zeppelin 1 1,236 Apr-28-2022, 06:35 PM
Last Post: Larz60+
  Cannot install tensorflow, numpy etc in Pycharm with Python 3.10 plumberpy 2 3,497 Oct-07-2021, 05:33 AM
Last Post: plumberpy

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020