You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ImportError: dlopen(/Users/myname/Library/Python/3.8/lib/python/site-packages/_Mykytea.cpython-38-darwin.so, 2): Symbol not found: __ZN5kytea10StringUtil9normalizeERKNS_11KyteaString
#26
Closed
lechang-zhang opened this issue
Apr 21, 2022
· 2 comments
I installed Mykytea-python via pip, pip install kytea
And then wrote the code below to use the basic functionality of kytea
import Mykytea
opt = "-model /opt/homebrew/Cellar/kytea/0.4.7/share/kytea/model.bin"
mk = Mykytea.Mykytea(opt)
s = "今日はいい天気です"
for word in mk.getWS(s):
print(word)
print(mk.getTagsToString(s))
t = mk.getTags(s)
showTags(t)
tt = mk.getAllTags(s)
showTags(tt)
But after I run my code, it threw me an importError:
Traceback (most recent call last):
File "/Users/myname/Desktop/kytea_test/test.py", line 1, in
import Mykytea
File "/Users/myname/Library/Python/3.8/lib/python/site-packages/Mykytea.py", line 15, in
import _Mykytea
ImportError: dlopen(/Users/myname/Library/Python/3.8/lib/python/site-packages/_Mykytea.cpython-38-darwin.so, 2): Symbol not found: __ZN5kytea10StringUtil9normalizeERKNS_11KyteaStringE
Referenced from: /Users/myname/Library/Python/3.8/lib/python/site-packages/_Mykytea.cpython-38-darwin.so
Expected in: flat namespace
in /Users/myname/Library/Python/3.8/lib/python/site-packages/_Mykytea.cpython-38-darwin.so
I wonder if it's because my kytea was installed under /opt/homebrew/Cellar instead of /usr/local/lib, so I moved kytea folder to /usr/local/lib but it still threw me the importError.
I'm very new in using python and searched a lot for solving this but didn't find any solution. I would be very grateful if you can help me.
The text was updated successfully, but these errors were encountered:
lechang-zhang
changed the title
ImportError: dlopen(/Users/***/Library/Python/3.8/lib/python/site-packages/_Mykytea.cpython-38-darwin.so, 2): Symbol not found: __ZN5kytea10StringUtil9normalizeERKNS_11KyteaString
ImportError: dlopen(/Users/myname/Library/Python/3.8/lib/python/site-packages/_Mykytea.cpython-38-darwin.so, 2): Symbol not found: __ZN5kytea10StringUtil9normalizeERKNS_11KyteaString
Apr 21, 2022
Thank you for providing Mykytea-python :)
I installed Mykytea-python via pip,
pip install kytea
And then wrote the code below to use the basic functionality of kytea
But after I run my code, it threw me an importError:
I wonder if it's because my kytea was installed under /opt/homebrew/Cellar instead of /usr/local/lib, so I moved kytea folder to /usr/local/lib but it still threw me the importError.
I'm very new in using python and searched a lot for solving this but didn't find any solution. I would be very grateful if you can help me.
The text was updated successfully, but these errors were encountered: