SamuraiT / mecab-python3

:snake: mecab-python. you can find original version here:http://taku910.github.io/mecab/
https://pypi.python.org/pypi/mecab-python3
Other
539 stars 51 forks source link

Unable to install on macOS Big Sur with Apple Silicon M1 #60

Closed satoi8080 closed 3 years ago

satoi8080 commented 3 years ago

Python3.9 macOS 11.0.1 Apple M1 pip 20.2.4

Complete output (10 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-11.0-x86_64-3.9
creating build/lib.macosx-11.0-x86_64-3.9/MeCab
copying src/MeCab/__init__.py -> build/lib.macosx-11.0-x86_64-3.9/MeCab
copying src/MeCab/cli.py -> build/lib.macosx-11.0-x86_64-3.9/MeCab
running build_ext
error: [Errno 2] No such file or directory: 'mecab-config'
polm commented 3 years ago

Thanks for the report.

What's happening is that since this is a new architecture there are no wheels for it. It looks like it's possible to use this architecture on Github Actions so I'll look into that.

You should be able to build from source, but you'll have to install MeCab from source first, which will make mecab-config available.

I'll leave this ticket open until I get wheels for the new platform ready.

polm commented 3 years ago

Looks like I should be able to use this to build wheels:

https://github.com/uraimo/run-on-arch-action

polm commented 3 years ago

Actually looks like this is the relevant item for building on OSX 11:

https://github.blog/changelog/2020-10-29-github-actions-macos-big-sur-preview/

satoi8080 commented 3 years ago

Now successfully installed with no error after pip released a new version

pip 20.3.1

polm commented 3 years ago

Oh, that's interesting. I hadn't actually done anything yet - thanks for the update!

polm commented 3 years ago

Looks like this was the pip issue that fixed things, in 20.3:

https://github.com/pypa/pip/issues/9138

satoi8080 commented 3 years ago

I suppose you could close this issue and append requirement of pip version in the document later, however, the new version of pip now deprecates the support of Python 3.5

polm commented 3 years ago

Sounds good, I added a note to the README for now. Python 3.5 support is only in the latest version by accident - it was removed from the README a while ago - so for now I'll just leave it unmentioned unless someone asks.

Thanks again for the report and followup!