Skip to content

Commit 99695b2

Browse files
authored
Merge pull request #52 from Gregory-Pereira/update-installation-docs-for-OSX
add homebrew installation path + fix linux prefix setting
2 parents e2416bf + 8a25ccc commit 99695b2

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,17 @@ So for a working OCR functionality, make sure to complete this checklist:
143143

144144
- Unix systems: `/usr/share/tesseract-ocr/5/tessdata`
145145

146+
- macOS (installed via Homebrew):
147+
- Standard installation: `/opt/homebrew/share/tessdata`
148+
- Version-specific installation: `/opt/homebrew/Cellar/tesseract/<version>/share/tessdata/`
149+
146150
3. Set the environment variable TESSDATA_PREFIX
147151

148152
- Windows: `setx TESSDATA_PREFIX "C:/Program Files/Tesseract-OCR/tessdata"`
149153

150-
- Unix systems: `declare -x TESSDATA_PREFIX= /usr/share/tesseract-ocr/5/tessdata`
154+
- Unix systems: `declare -x TESSDATA_PREFIX=/usr/share/tesseract-ocr/5/tessdata`
155+
156+
- macOS (installed via Homebrew): `export TESSDATA_PREFIX=$(brew --prefix tesseract)/share/tessdata`
151157

152158
**Note:** _On Windows systems, this must happen outside Python – before starting your script. Just manipulating os.environ will not work!_
153159

0 commit comments

Comments
 (0)