Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It not working on mac #4

Open
dssoft32 opened this issue Dec 13, 2024 · 1 comment
Open

It not working on mac #4

dssoft32 opened this issue Dec 13, 2024 · 1 comment

Comments

@dssoft32
Copy link

any solution fo mac?

@Devansh80
Copy link
Owner

Not sure, I was trying to make some changes but not sure if it will work or not


import sys

Detect the operating system

platform_name = sys.platform

Adjust paths or assume tools are in system PATH

if platform_name.startswith("win"):
pytesseract.pytesseract.tesseract_cmd = r"C:\Program Files\Tesseract-OCR\tesseract.exe"
poppler_path = r"C:\path\to\poppler\bin"
elif platform_name == "darwin": # macOS is identified as 'darwin'
pytesseract.pytesseract.tesseract_cmd = "tesseract"
poppler_path = None # Assume pdftoppm from Poppler is in system PATH
elif platform_name.startswith("linux"):
pytesseract.pytesseract.tesseract_cmd = "tesseract"
poppler_path = None # Assume pdftoppm from Poppler is in system PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants