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

Mokuro installing an incompatible version of numpy? #120

Closed
xrishox opened this issue Jan 5, 2025 · 3 comments · Fixed by #124
Closed

Mokuro installing an incompatible version of numpy? #120

xrishox opened this issue Jan 5, 2025 · 3 comments · Fixed by #124

Comments

@xrishox
Copy link

xrishox commented Jan 5, 2025

I was trying to get the avif branch of mokuro working today and I was getting this error from it

mokuro 第01巻
Traceback (most recent call last):
  File "/home/anonymous/miniconda3/envs/mokuro-avif/bin/mokuro", line 5, in <module>
    from mokuro.__main__ import main
  File "/home/anonymous/miniconda3/envs/mokuro-avif/lib/python3.9/site-packages/mokuro/__init__.py", line 3, in <module>
    from mokuro.manga_page_ocr import MangaPageOcr as MangaPageOcr
  File "/home/anonymous/miniconda3/envs/mokuro-avif/lib/python3.9/site-packages/mokuro/manga_page_ocr.py", line 9, in <module>
    from comic_text_detector.inference import TextDetector
  File "/home/anonymous/miniconda3/envs/mokuro-avif/lib/python3.9/site-packages/comic_text_detector/inference.py", line 14, in <module>
    from comic_text_detector.utils.io_utils import imread, imwrite, find_all_imgs, NumpyEncoder
  File "/home/anonymous/miniconda3/envs/mokuro-avif/lib/python3.9/site-packages/comic_text_detector/utils/io_utils.py", line 11, in <module>
    NP_BOOL_TYPES = (np.bool_, np.bool8)
  File "/home/anonymous/miniconda3/envs/mokuro-avif/lib/python3.9/site-packages/numpy/__init__.py", line 410, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'bool8'

force installing an older version of numpy fixes this issue.

kha-white/manga-ocr#88

i'm wondering if this might be related?

@Fluttrr
Copy link

Fluttrr commented Jan 7, 2025

I use mokuro in one of my programs and a user experienced the same problem. Can you confirm any working version of numpy to downgrade to?

@kha-white
Copy link
Owner

Try numpy 1.26. It was an error to have the numpy constraint in manga-ocr instead of mokuro. I'll fix it soon.

@gorogoroshiki
Copy link

I also experienced this issue and downgrading numpy fixed it.

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.

4 participants