-
Notifications
You must be signed in to change notification settings - Fork 52
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
Trouble installing on macOS Big Sur 11.2.2 MacBookPro Apple silicon chip #71
Comments
Hey, sorry you're having trouble with this. It looks like pip is trying to install mecab-python3 from source, which shouldn't happen. What version of Python and pip do you have? This package doesn't have arm64 OSX wheels, but my understanding is that the x86 wheels should work. Maybe you could try downloading a wheel from here and installing it directly: |
@polm , below is my pip and python version
Let me try downloading it directly, Thank you |
Hm, that looks like it should work. Let me know if the direct download works or not. |
So the direct download has failed to work too
@polm , I also tried this below still failed
|
That's weird, but it looks like the OSX version name in the wheel file can cause issues. Note that only the cp38 file should work since you're using Python 3.8. I need to look into the OSX fix more, but here's a couple of things you can try:
Related issue: |
Tried installing fugashi , returns kind of a similar error
I also upgraded the pip version. It was already up to date , That leaves me with only the last option of a related issue |
Ah, sorry none of those worked. I am still going through the related issue myself, but if you want to look at it it might provide useful reference. Unfortunately the only thing that looks like it might be a thorough fix (towards the bottom of the thread) looks somewhat involved and doesn't have many people chiming in. |
Hey, I am kind of out of ideas on this one, sorry. I will keep looking at reports of similar errors but I'm not sure when I'll have more advice. I do not have any OSX devices I can test on either. The only thing I could recommend is maybe trying using a non-anaconda Python. Sometimes conda has install errors that are hard to track down or replicate. Alternately, you could install MeCab from source, in which case you can install this library from source. If you're used to installing C++ libraries from source that shouldn't be too bad. Another option is to use a non-compiled tokenizer like Janome, which will be slower and use the obsolete IPADic, but it should be platform independent. If I see anything likely in related issues I'll mention it here but I can't promise anything, sorry. |
I think I figured out your issue, it seems it's kind of like #72. mecab-python3 only has x86_64 wheels for OSX. On M1 machines, arm64 and x86_64 wheels are both usable, but the version you use must match the version of Python you have. It seems you are using an arm64 version of Python. If you switch to an x86_64 version it should just work. If you want to keep using arm64, that should work, but you'll have to build MeCab and this package from source yourself. Miniconda has both arm64 and x86_64 versions on OSX, thought the arm64 version is still experimental. |
Hello @polm, You are very right on this. I did switch to the intel architecture in my conda environment but the python version was still showing an arm64 architecture. Could you please share with me the miniconda install link for the arm64 version. Thank you |
This is very right @polm . I did switch architectures to the x86_64 and when I normally run in my terminal checking the architecture, it is ok but when I check the architecture of the python version in my anaconda within the python console, it brings back arm64 architecture.
I guess am gonna try seeing if I can have the python setup in my conda environment show up x86_64 instead or arm 64. |
Glad to hear that explains your issue! You can find the x86_64 OSX miniconda installer here. |
Since I think this is resolved I'm going to go ahead and close it, but let me know if you need help with anything else. |
Same error, MacOS 12.5.1 (arm64 aka M1), Python 3.9.13 /Users/artem/Desktop/tts/env/lib/python3.9/site-packages/setuptools/installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
warnings.warn(
WARNING: The wheel package is not available.
WARNING: The wheel package is not available.
running install
/Users/artem/Desktop/tts/env/lib/python3.9/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build/lib.macosx-12-arm64-cpython-39
creating build/lib.macosx-12-arm64-cpython-39/MeCab
copying src/MeCab/__init__.py -> build/lib.macosx-12-arm64-cpython-39/MeCab
copying src/MeCab/cli.py -> build/lib.macosx-12-arm64-cpython-39/MeCab
running build_ext
error: [Errno 2] No such file or directory: 'mecab-config'
pip freeze
|
As mentioned upthread, the issue is there are no wheels for arm64 because I have no way to automate builds on that architecture. You can use the x86_64 wheels or build from source, which requires installing MeCab first. Let me make an issue to track this... |
Hey, I stumbled here because I got the same error trying to install your package on Apple Silicon. Regarding the lack of access to that particular architecture, I can recommend using cibuildwheels in combination with |
Ah, I forgot to link in the general issue I made: #84. This discussion should continue there. I have used cibuildwheel before, I'll take another look at it. But as noted in polm/fugashi#55 (comment), it has previously failed to work. Now that Github has native M1 runners maybe it's working... |
Sad to report that the support for native M1 runners only extends to self-hosted ones, and if you don't have access to Apple Silicon yourself, this will not help. Instead of using x86-based wheels, the way might be building a |
I was able to compile it myself using the following on an M1 Mac:
|
Thank you very much, this was the easiest fix. I'd never compiled a pip package by myself so I would've been lost without your help. |
For me, only |
Thank you!! This helped me out! (I followed the same procedure without doing the >brew install mecab, and it didn't work). Thanks!! |
Hello, |
@thekoko89 I am genuinely sorry that you have to deal with this, but I do not develop on a Mac and also am not the developer of TTS (I assume you mean coqui-tts?), so I will have to suggest you look for help elsewhere. To be clear, coqui-tts only actually uses this package for Japanese, and their decision to make it a requirement even when not using Japanese is a poor engineering decision and sends people here asking for help I can't give. It should also be very easy to fix, though they have indicated they don't consider it important. If anyone reading this later is having issues with coqui-tts, please contact the maintainers of that package and tell them to list this package as an optional requirement. I will also be locking this issue and confining further discussion on M1 wheels in general to #84. |
As of the latest release, the Coqui AI TTS package should no longer require mecab-python3 by default. |
I get this error when I run
pip install mecab-python3
The text was updated successfully, but these errors were encountered: