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

Can't install on MacOS Ventura Intel x86 Python 3.11 #81

Closed
tak2hu opened this issue Aug 9, 2023 · 5 comments
Closed

Can't install on MacOS Ventura Intel x86 Python 3.11 #81

tak2hu opened this issue Aug 9, 2023 · 5 comments
Labels
osx Mac OSX related issues

Comments

@tak2hu
Copy link

tak2hu commented Aug 9, 2023

I already installed mecab and unidic-lite

Collecting fugashi
  Using cached fugashi-1.2.1.tar.gz (337 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/zj/qrp2fd392hz9t9f8kpnbkr600000gn/T/pip-install-n9jm53hb/fugashi_08463b6ceb92463991c8021884dcd2d4/setup.py", line 15, in <module>
          output, data_files = check_libmecab()
                               ^^^^^^^^^^^^^^^^
        File "/private/var/folders/zj/qrp2fd392hz9t9f8kpnbkr600000gn/T/pip-install-n9jm53hb/fugashi_08463b6ceb92463991c8021884dcd2d4/fugashi_util.py", line 58, in check_libmecab
          raise RuntimeError("Could not configure working env. Have you installed MeCab?")
      RuntimeError: Could not configure working env. Have you installed MeCab?
      [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.
@polm polm added the osx Mac OSX related issues label Aug 11, 2023
@polm
Copy link
Owner

polm commented Aug 11, 2023

This can happen if mecab-config is not in your PATH. This doesn't seem to usually be an issue on OSX, but maybe you installed to a different location or something? How did you install MeCab?

@tak2hu
Copy link
Author

tak2hu commented Aug 11, 2023

I installed mecab through pip install mecab-python3 (also unidic_lite too) but there's no mecab-config, there's only mecab-py and mecab-py-info in PATH.

I then tried tried using micromamba (anaconda) with python 3.9 and had no problem because it downloaded .whls instead of building.

@tak2hu tak2hu changed the title Can't install on MacOS Ventura Python 3.11 Can't install on MacOS Ventura Intel x86 Python 3.11 Aug 11, 2023
@polm
Copy link
Owner

polm commented Aug 11, 2023

I installed mecab through pip install mecab-python3 (also unidic_lite too) but there's no mecab-config, there's only mecab-py and mecab-py-info in PATH.

To install MeCab from source, as you were doing here, you need to install the original MeCab C++ program/library, not any Python package. fugashi cannot use the MeCab included in mecab-python3. I believe the usual way to install MeCab from source is via brew, as described here.

It sounds like this is resolved now since you were able to use x86 wheels?

@tak2hu
Copy link
Author

tak2hu commented Aug 11, 2023

I opened this issue because there was no osx x86 py3.11 wheels and I didn’t know how to build this and mecab from source, now I know. Thanks!

@tak2hu tak2hu closed this as completed Aug 11, 2023
@polm
Copy link
Owner

polm commented Aug 12, 2023

Got it, thanks for the clarification, and glad you figured it out!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
osx Mac OSX related issues
Projects
None yet
Development

No branches or pull requests

2 participants