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

Importing fugashi raises ImportError on macOS #70

Closed
kumapo opened this issue Jan 30, 2023 · 3 comments
Closed

Importing fugashi raises ImportError on macOS #70

kumapo opened this issue Jan 30, 2023 · 3 comments
Labels
osx Mac OSX related issues

Comments

@kumapo
Copy link

kumapo commented Jan 30, 2023

fugashi v1.2.1 raises ImportError, but v1.2.0 does nothing.
Is there something wrong on my part?

the traceback:

..
ImportError: dlopen(~/.local/share/virtualenvs/Oyeve75j/lib/python3.8/site-packages/fugashi/fugashi.cpython-38-darwin.so, 2): Symbol not found: __ZNKSt3__115basic_stringbufIcNS_11char_traitsIcEENS_9allocatorIcEEE3strEv
  Referenced from: ~/.local/share/virtualenvs/Oyeve75j/lib/python3.8/site-packages/fugashi/.dylibs/libmecab.2.dylib (which was built for Mac OS X 12.0)
  Expected in: /usr/lib/libc++.1.dylib

OS: macOS (10.15.7)
Python: 3.8.2
fugashi: 1.2.1

@polm polm added the osx Mac OSX related issues label Jan 31, 2023
@polm
Copy link
Owner

polm commented Jan 31, 2023

Sorry you're having trouble with this. It sounds like maybe you're on an M1 Mac - in that case you need to install MeCab first, and then install fugashi from source. See this thread, which is for mecab-python3, though it's the same problem.

Also, it would help to know how you installed fugashi. It sounds like your specific error is maybe due to an architecture mismatch, or possibly due to some other difference in the compilation between fugashi and MeCab.

Also, when you say 1.2.0 "does nothing", do you mean it works without error, or something else?

@kumapo
Copy link
Author

kumapo commented Jan 31, 2023

Thank you for your quick reply.

Actually I tested it on Intel Mac.
and, what I meant by that is v1.2.0 works without any errors.

Also, when you say 1.2.0 "does nothing", do you mean it works without error, or something else?
I meant

based on your suggestion, it may exist the arch mismatch between fugashi and MeCab on my side.

@polm
Copy link
Owner

polm commented Mar 6, 2023

Sorry for the delayed followup, but since it sounds like an issue on your end I'll close this. Feel free to post again if there's something I can help with.

@polm polm closed this as completed Mar 6, 2023
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