-
Notifications
You must be signed in to change notification settings - Fork 253
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
can't import tesserocr #160
Comments
please show import error |
if import tesserocr , then run the program, show:!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209 |
!strcmp(locale, "C"):Error:Assert failed:in file baseapi.cpp, line 209 i am the same error with you ,but i found it work well in python2.7 |
Pycharm latest version seemed to have the issue where even after installing it wasn't able to import tesserocr. So I downgraded my Pycharm to the version 2018.1.6 and the import error for tesserocr got fixed. If locale error then it can be fixed by either importing export LC_ALL=C in terminal or setting it in the python file where you are using tesserocr as locale.setlocale(locale.LC_ALL, 'C') or if still getting error in Pycharm IDE then just set LC_ALL=C as Environment variable in the run configuration for that file. |
I have the same problem using the official installation instructions. Been trying to fix the error:
For hours. |
I can corroborate that on python3.7.5, with tesserocr version 2.5.0 a segfault appears on import if the locale has not been set to "C". |
The locale issue has been addressed already and was related to tesseract itself and not tesserocr. It's already been fixed in tesseract 4.1 (see #165) |
already installed tesserocr ,but can not find the tesserocr
system:Mac OS 10.12.6
Python:3.6.6
tesseract:4.0.0
tesserocr:2.3.1
The text was updated successfully, but these errors were encountered: