1

I ran both

sudo pip install asprise_ocr_sdk_python_api

pip install asprise_ocr_sdk_python_api

Got message

"Requirement already satisfied: asprise_ocr_sdk_python_api in /Users/myid/miniconda3/envs/competition/lib/python3.5/site-packages"

But when I ran asprise_ocr to test:

Got the following error:

Traceback (most recent call last):
  File "/Users/myuser/miniconda3/envs/competition/bin/asprise_ocr", line 7, in <module>
    from asprise_ocr_api.ocr_app import run_ocr_app
  File "/Users/myuser/miniconda3/envs/competition/lib/python3.5/site-packages/asprise_ocr_api/__init__.py", line 1, in <module>
    from ocr import *
ImportError: No module named 'ocr'
BlueDolphin
  • 9,765
  • 20
  • 59
  • 74

2 Answers2

0

The asprise_ocr_api module doesn't do submodule imports correctly in Python 3. For example init.py contains from ocr import *. For a sub-module in Python 3 that should be from .ocr import *. Idem for from ocr_app import OcrApp, run_ocr_app. That should be from .ocr_app import OcrApp, run_ocr_app. After making these changes in all files it imports correctly.

0

i've tried:

import ocr

same error:

ModuleNotFoundError: No module named 'ocr'

i am using python 3

costamatrix
  • 670
  • 8
  • 17