Pytesseract project setup: How do I get the package install location?
Hello, I'm struggling with making a discord bot using Pytesseract, I got it running but I don't know how to get the installation path of the tesseract to fix the message:
/app/.apt/usr/bin/tesseract is not installed or it's not in your PATH. See README file for more information.
.
I read in an overflow question how to deploy using pytesseract but the instructions are from Heroku, the answer tells me to:
- Add a build pack. ✅ https://discord.com/channels/713503345364697088/1139391639232712734
- Create an Aptfile. ✅
- Find the tessdata folder to set the variable. ❔
link: https://stackoverflow.com/a/56457594
What I've tried:
- Run bash with railway. (only runs locally)
- Tried to create a docker to see if I can get a path or some clue.
Project ID: bf07da5c-d35e-4b6d-a262-c39207f4488c
nixpacks.toml
Procfile
requirements.txt
Sorry if this question sounds stupid, I'm coming from front-end and I'm totally stupid with it. 😦Stack Overflow
How to deploy pytesseract to Heroku
I have a Python app which words great via Localhost on my machine.
I am trying to deploy it to Heroku. However it does not seem possible to accomplish this (I have spent approx 30 hours trying no...
Solution:Jump to solution
shouldn't pytesseract be able to find that out for itself?
but you are giving it an incorrect path
https://github.com/HenriqueFLTorres/Mir4Tools-Bot/blob/main/utils.py#L5...
15 Replies
Project ID:
bf07da5c-d35e-4b6d-a262-c39207f4488c
hey, is this still an issue?
yes 😂 , I haven't tried anything new because I have no idea what to do
can you share your repo please
GitHub
GitHub - HenriqueFLTorres/Mir4Tools-Bot: A discord bot developed fo...
A discord bot developed for mir4 tools inventory matching and general assistance - GitHub - HenriqueFLTorres/Mir4Tools-Bot: A discord bot developed for mir4 tools inventory matching and general ass...
quick question, what platform uses an Aptfile
That's was an instruction given by the answers in the stack overflow question to deploy in heroku...
@Vin I have no idea
I’ve never used pytesseract honestly. Not even sure what it is
Google is your friend OP
I don’t google. I DuckIt
But I’ll look into it when I’m not working
@elberrd was also trying to deploy a project using pytesseract, but I didn't get a answers from him.
Basically, I need to get a path of
tessdata
folder to work with pytesseract...Solution
shouldn't pytesseract be able to find that out for itself?
but you are giving it an incorrect path
https://github.com/HenriqueFLTorres/Mir4Tools-Bot/blob/main/utils.py#L5
Sorry for being late. Surprisingly, that was the solution! Thank you!
Different from the Heroku deploy instructions, pytesseract can run without any path given. So I even had to remove the environment variable
TESSDATA_PREFIX
.sounds good, glad you got it working