kha-white / manga-ocr

Optical character recognition for Japanese text, with the main focus being Japanese manga
Apache License 2.0
1.65k stars 87 forks source link

Cannot run manga-ocr #67

Open D9vilstar opened 3 months ago

D9vilstar commented 3 months ago

Hello, everyone. Can some one help me on this one? I'm a noob in python thing. So, after I've installed manga_ocr using command line pip3 install manga-ocr, I tried to run it using "manga_ocr" in cmd, but it says "importerror bla bla bla" and manga_ocr not running at all. Hope someone would help me

Yerin99 commented 3 months ago

Did you check this?

ImportError: DLL load failed while importing fugashi: The specified module could not be found. - might be because of Python installed from Microsoft Store, try installing Python from the official site

It's a manual regarding the import error in the readme.

+) If you want a more accurate answer, I recommend attaching the full error message when you ask.

D9vilstar commented 3 months ago

Screenshot (343) Sorry, this is the full error message I got

D9vilstar commented 3 months ago

Did you check this?

ImportError: DLL load failed while importing fugashi: The specified module could not be found. - might be because of Python installed from Microsoft Store, try installing Python from the official site

It's a manual regarding the import error in the readme.

+) If you want a more accurate answer, I recommend attaching the full error message when you ask.

Screenshot (343) Sorry, this is the full error message I got

kha-white commented 3 months ago

I cannot replicate it unfortunately. I don't know why it happens, I'd suggest to reinstall jaconv and if it doesn't work then maybe try another version of Python.

MoeMonsuta commented 1 month ago

Hello, everyone. Can some one help me on this one? I'm a noob in python thing. So, after I've installed manga_ocr using command line pip3 install manga-ocr, I tried to run it using "manga_ocr" in cmd, but it says "importerror bla bla bla" and manga_ocr not running at all. Hope someone would help me

Same here, and I did not install from Microsoft Store, ew.. using Py 3.11 like always, but after last update it won't run anymore. I do have Torch 2.4 + Cuda 12.1 though, maybe Manga OCR doesn't support new Torch 2.4? I used manga ocr in the past fine so idk what's wrong.

manga_ocr
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "C:\Python311\Scripts\manga_ocr.exe\__main__.py", line 4, in <module>
  File "C:\Python311\Lib\site-packages\manga_ocr\__init__.py", line 2, in <module>
    from manga_ocr.ocr import MangaOcr
  File "C:\Python311\Lib\site-packages\manga_ocr\ocr.py", line 5, in <module>
    import torch
  File "C:\Python311\Lib\site-packages\torch\__init__.py", line 148, in <module>
    raise err
OSError: [WinError 126] The specified module could not be found. Error loading "C:\Python311\Lib\site-packages\torch\lib\fbgemm.dll" or one of its dependencies.

Ok I solved problem by installing Torch 2.2 + Cuda 12.1.

pip3 install torch==2.2 torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121

I recommend that Developer list the Torch maximum version requirement on main readme page so people can enjoy his hard work on this software more ~