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

selection via OCRD_MODULES fails due to dependent modules #364

Closed
joschrew opened this issue Apr 25, 2023 · 4 comments
Closed

selection via OCRD_MODULES fails due to dependent modules #364

joschrew opened this issue Apr 25, 2023 · 4 comments
Assignees

Comments

@joschrew
Copy link

joschrew commented Apr 25, 2023

I tried to install ocrd_all with the setup-guide: https://ocr-d.de/en/setup:

make all OCRD_MODULES="core ocrd_tesserocr ocrd_cis"

and got following error running the mentioned command:

Successfully installed numpy-1.24.3 shapely-2.0.1
make[1]: Leaving directory '/home/cloud/repos/ocrd_all/core' 
. /home/cloud/repos/ocrd_all/venv/bin/activate && cd tesserocr && sem -q --will-cite --fg --id ocrd_all_pipvenv pip insta
ll  .
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
make: *** [Makefile:671: /home/cloud/repos/ocrd_all/venv/share/tesserocr] Error 1

Seems the problem is that ocrd_tesserocr needs tesserocr to be installed. The installation of tesserocr is triggered but the sources are not fetched and that leads to the error. Running make all OCRD_MODULES="core ocrd_tesserocr ocrd_cis tesseract tesserocr" resolves the problem but maybe it would be good to change the makefile to be able to fetch the needed sources itself.

@bertsky bertsky changed the title make all OCRD_MODULES="core ocrd_tesserocr ocrd_cis" fails due to dependend modules selection via OCRD_MODULES fails due to dependent modules Apr 25, 2023
@bertsky
Copy link
Collaborator

bertsky commented Apr 25, 2023

Except for core (which is needed everywhere and can be seen as a special case) and tesseract/tesserocr, we have no dependencies between modules. In the latter case, we have some special rules which should switch over to the PPA installation of Tesseract if it is not selected as a module. So AFAICS the actual issue here is more specific: for some reason, these rules for tesserocr do not work anymore.

@bertsky
Copy link
Collaborator

bertsky commented Apr 25, 2023

Looking closer, we have 3 places where we try to turn some pip dependency into an explicit target via $(SHARE)/%:

  • numpy → do we still need this? It gets pulled by core already, and many modules depend on it – all via pip. IIRC the initial reason was that OpenCV build used to have it as a build-time dependency
  • opencv-python → only need on some platforms without prebuilt versions on PyPI; installation via source module (custom rules) is enforced by making core depend on it explicitly (so it gets built before anything else)
  • tesserocr → there used to be a time when no usable prebuilt version were available on PyPI (that would interoperate with recent Tesseract), and this may happen again in the future; for that we included it as a submodule; but when you do not activate it (via git submodule init or OCRD_MODULES), this should just install via pip. Apparently, the latter is not the case (anymore?).

@bertsky
Copy link
Collaborator

bertsky commented Apr 26, 2023

BTW, opencv-python build is broken at the moment.

@bertsky bertsky self-assigned this Apr 27, 2023
@bertsky
Copy link
Collaborator

bertsky commented Jun 20, 2023

has been fixed by #362

@bertsky bertsky closed this as completed Jun 20, 2023
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

Successfully merging a pull request may close this issue.

2 participants