Skip to content

Can't run manga_ocr anymore #101

@Kuroonehalf

Description

@Kuroonehalf

As of recently, perhaps when I reinstalled my NVIDIA drivers, manga_ocr has stopped running. Reinstalling did not fix it. Here's my error message:

2025-09-10 01:06:32.561285: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'cudart64_110.dll'; dlerror: cudart64_110.dll not found
2025-09-10 01:06:32.561377: I tensorflow/stream_executor/cuda/cudart_stub.cc:29] Ignore above cudart dlerror if you do not have a GPU set up on your machine.

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\Scripts\manga_ocr.exe\__main__.py", line 4, in <module>
    from manga_ocr.__main__ import main
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\__init__.py", line 2, in <module>
    from manga_ocr.ocr import MangaOcr as MangaOcr
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\ocr.py", line 8, in <module>
    from transformers import ViTImageProcessor, AutoTokenizer, VisionEncoderDecoderModel, GenerationMixin
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\import_utils.py", line 2302, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\import_utils.py", line 2330, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\models\vit\image_processing_vit.py", line 21, in <module>
    from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\image_processing_utils.py", line 22, in <module>
    from .image_transforms import center_crop, normalize, rescale
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\image_transforms.py", line 48, in <module>
    import tensorflow as tf
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\__init__.py", line 37, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\__init__.py", line 37, in <module>
    from tensorflow.python.eager import context
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\eager\context.py", line 35, in <module>
    from tensorflow.python.client import pywrap_tf_session
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\client\pywrap_tf_session.py", line 19, in <module>
    from tensorflow.python.client._pywrap_tf_session import *
AttributeError: _ARRAY_API not found

A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.2 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.

If you are a user of the module, the easiest solution will be to
downgrade to 'numpy<2' or try to upgrade the affected module.
We expect that some modules will need time to support NumPy 2.

Traceback (most recent call last):  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\Scripts\manga_ocr.exe\__main__.py", line 4, in <module>
    from manga_ocr.__main__ import main
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\__init__.py", line 2, in <module>
    from manga_ocr.ocr import MangaOcr as MangaOcr
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\ocr.py", line 8, in <module>
    from transformers import ViTImageProcessor, AutoTokenizer, VisionEncoderDecoderModel, GenerationMixin
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\import_utils.py", line 2302, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\import_utils.py", line 2330, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\models\vit\image_processing_vit.py", line 21, in <module>
    from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\image_processing_utils.py", line 22, in <module>
    from .image_transforms import center_crop, normalize, rescale
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\image_transforms.py", line 48, in <module>
    import tensorflow as tf
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\__init__.py", line 37, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\__init__.py", line 42, in <module>
    from tensorflow.python import data
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\__init__.py", line 21, in <module>
    from tensorflow.python.data import experimental
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\__init__.py", line 95, in <module>
    from tensorflow.python.data.experimental import service
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\service\__init__.py", line 387, in <module>
    from tensorflow.python.data.experimental.ops.data_service_ops import distribute
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py", line 23, in <module>
    from tensorflow.python.data.experimental.ops import compression_ops
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py", line 16, in <module>
    from tensorflow.python.data.util import structure
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\util\structure.py", line 22, in <module>
    from tensorflow.python.data.util import nest
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\util\nest.py", line 36, in <module>
    from tensorflow.python.framework import sparse_tensor as _sparse_tensor
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\sparse_tensor.py", line 24, in <module>
    from tensorflow.python.framework import constant_op
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\constant_op.py", line 25, in <module>
    from tensorflow.python.eager import execute
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\eager\execute.py", line 23, in <module>
    from tensorflow.python.framework import dtypes
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\dtypes.py", line 26, in <module>
    from tensorflow.python.lib.core import _pywrap_bfloat16
AttributeError: _ARRAY_API not found
ImportError: numpy.core._multiarray_umath failed to import
ImportError: numpy.core.umath failed to import
Traceback (most recent call last):
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\Scripts\manga_ocr.exe\__main__.py", line 4, in <module>
    from manga_ocr.__main__ import main
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\__init__.py", line 2, in <module>
    from manga_ocr.ocr import MangaOcr as MangaOcr
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\manga_ocr\ocr.py", line 8, in <module>
    from transformers import ViTImageProcessor, AutoTokenizer, VisionEncoderDecoderModel, GenerationMixin
  File "<frozen importlib._bootstrap>", line 1055, in _handle_fromlist
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\import_utils.py", line 2302, in __getattr__
    module = self._get_module(self._class_to_module[name])
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\import_utils.py", line 2332, in _get_module
    raise e
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\utils\import_utils.py", line 2330, in _get_module
    return importlib.import_module("." + module_name, self.__name__)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\models\vit\image_processing_vit.py", line 21, in <module>
    from ...image_processing_utils import BaseImageProcessor, BatchFeature, get_size_dict
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\image_processing_utils.py", line 22, in <module>
    from .image_transforms import center_crop, normalize, rescale
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\transformers\image_transforms.py", line 48, in <module>
    import tensorflow as tf
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\__init__.py", line 37, in <module>
    from tensorflow.python.tools import module_util as _module_util
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\__init__.py", line 42, in <module>
    from tensorflow.python import data
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\__init__.py", line 21, in <module>
    from tensorflow.python.data import experimental
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\__init__.py", line 95, in <module>
    from tensorflow.python.data.experimental import service
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\service\__init__.py", line 387, in <module>
    from tensorflow.python.data.experimental.ops.data_service_ops import distribute
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\ops\data_service_ops.py", line 23, in <module>
    from tensorflow.python.data.experimental.ops import compression_ops
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\experimental\ops\compression_ops.py", line 16, in <module>
    from tensorflow.python.data.util import structure
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\util\structure.py", line 22, in <module>
    from tensorflow.python.data.util import nest
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\data\util\nest.py", line 36, in <module>
    from tensorflow.python.framework import sparse_tensor as _sparse_tensor
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\sparse_tensor.py", line 24, in <module>
    from tensorflow.python.framework import constant_op
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\constant_op.py", line 25, in <module>
    from tensorflow.python.eager import execute
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\eager\execute.py", line 23, in <module>
    from tensorflow.python.framework import dtypes
  File "C:\Users\Kuro\AppData\Local\Programs\Python\Python39\lib\site-packages\tensorflow\python\framework\dtypes.py", line 29, in <module>
    _np_bfloat16 = _pywrap_bfloat16.TF_bfloat16_type()
TypeError: Unable to convert function return value to a Python type! The signature was
        () -> handle

As far as I can tell, this cudart64_110 file is installed in other programs' directories. I guess manga_ocr just can't see it now? I don't even know if this is the issue. I'd appreciate some help.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions