lukas-blecher / LaTeX-OCR

pix2tex: Using a ViT to convert images of equations into LaTeX code.
https://lukas-blecher.github.io/LaTeX-OCR/
MIT License
12.13k stars 999 forks source link

install error No module named 'entmax' #173

Open doongjohn opened 2 years ago

doongjohn commented 2 years ago
Collecting entmax
  Using cached entmax-1.0.tar.gz (7.2 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "C:\Users\doong\AppData\Local\Temp\pip-install-oh48alfs\entmax_2329299ca66a4770b008d5e24322fffa\setup.py", line 2, in <module>
          from entmax import __version__
      ModuleNotFoundError: No module named 'entmax'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

I can't install entmax pip install entmax produces the same error

lukas-blecher commented 2 years ago

I'm aware of this issue. Sadly there is not much I personally can do about it. Related https://github.com/deep-spin/entmax/issues/26

The solution is to first install pytorch, then install LaTeX-OCR. Follow the instructions on their website: https://pytorch.org/get-started/locally/

doongjohn commented 2 years ago

I first installed pythorch with this command pip3 install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu116

and then I installed pix2tex with this command pip install pix2tex[gui]

but the same error still occurs 😢 ModuleNotFoundError: No module named 'entmax'

what am I missing?

lukas-blecher commented 2 years ago

That's weird. What python version are you using?

I'd suggest to open another issue in the entmax repo

doongjohn commented 2 years ago

I'm using python 3.10.5 and pip 22.2.2

lukas-blecher commented 2 years ago

I was able to install it in 3.10 No idea what's happening