nlpub/pymystem3

Apple Silicon support

r4hx opened this issue · 1 comments

r4hx commented

Hi. I want to use this morph analyze for my project, but i get some error.

Python 3.7.3 (default, Jun 19 2019, 01:54:03) 
[GCC 6.3.0 20170516] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from pymystem3 import Mystem
>>> m = Mystem(
... )
Installing mystem to /root/.local/bin/mystem from http://download.cdn.yandex.net/mystem/mystem-3.1-linux-64bit.tar.gz
>>> text = "Красивая"
>>> lemma = m.lemmatize(text)
qemu-x86_64: Could not open '/lib64/ld-linux-x86-64.so.2': No such file or directory

Can this be fixed?

My enviroment:
macbook air m1
pymystem3 installed from github
python 3.7 in docker container

Thanks for you attention.

Are you on Linux/Docker on Apple Silicon? Anyway, this has to do with the fact the mystem is only compiled for x86. Your distro seems to try and run it via user-mode qemu to emulate x86 on ARM, but fails to find libraries to do so.

Here are pointers that may be helpful https://stackoverflow.com/questions/71040681/qemu-x86-64-could-not-open-lib64-ld-linux-x86-64-so-2-no-such-file-or-direc

To quote:

However I found the solution (well, a solution) to my situation was exactly the opposite of the solution to the OP's, and that was to add --platform=linux/amd64 to the FROM line of the docker file.