-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Installing error when using python:alpine
as the base image
#77
Comments
This happens if you build from source and don't have MeCab installed previously. fugashi will not install MeCab for you. It seems likely you're using something that doesn't have a wheel - what version of Python and what architecture are you using? |
This is the Dockerfile that causes this problem: FROM python:alpine
RUN pip install fugashi I've checked the python/pip version and the architecture, I found that they uses the same version & architecture:
|
Hm, those images both seem to have the same architecture, so not sure what's up. Can you check the verbose output of pip for both of them and see why it decides to install from source instead of from a wheel? |
Finally I found the reason why this happens: Alpine Linux uses musl, while manylinux wheels are based on glibc. (See pypa/pip#9735) And I also found the working tags for Alpine are |
Thank you for clarifying, that is something that wouldn't have occurred to me. Since nobody has ever brought this up before, I don't consider it a priority at the moment, though I understand Alpine is widely used. If someone would like to make a PR to add musl packages to wheel builds I'd be happy to consider it. In the meantime, you can install MeCab before fugashi, and then building fugashi from source should be fast and work without issue. |
I would just use And maybe just need to mention this issue in README would help most of the users. |
Thank you for the clarification. I updated the README with a list of platforms for which wheels are not available. |
Hello,
I'm trying to bundle my app into a docker image.
When using
python:alpine
as the base image, it causes errors like this (whilepython:slim
doesn't cause this error):I'm not sure if it's just that mecab doesn't support the platform, or there's something missing in
check_libmecab()
.The text was updated successfully, but these errors were encountered: