Skip to main content
more logs
ソース リンク
% curl -OL https://github.com/taku910/cabocha/archive/master.zip
% unzip master.zip
% cd cabocha-master
% pip install python/
/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 28, in <module>
    _CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'
/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 28, in <module>
    _CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

以下のページで似たような問題が記述されていましたが、解決方法は私の場合には役に立たないみたいです。助けてください!

macでmecab-python3のimport error(Symbol not found)を解決

% otool -L /Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so

/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so:
        /usr/local/lib/libcrfpp.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        @rpath/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
        @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
% ls /opt/homebrew/lib

libcrfpp.0.dylib        libcrfpp.dylib          libgmp.a                libgmpxx.4.dylib        libgmpxx.dylib
libcrfpp.a              libgmp.10.dylib         libgmp.dylib            libgmpxx.a              pkgconfig

install_tool_name -changeを使ってみると、

% install_name_tool -change "/usr/local/lib/libcrfpp.0.dylib" /opt/homebrew/lib/libcrfpp.0.dylib /Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so

% otool -L /Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so

/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so:
        /opt/homebrew/lib/libcrfpp.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        @rpath/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
        @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

結局同じエラーが出てきました。

/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 28, in <module>
    _CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

助けてください!

curl -OL https://github.com/taku910/cabocha/archive/master.zip
unzip master.zip
cd cabocha-master
pip install python/
/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 28, in <module>
    _CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

以下のページで似たような問題が記述されていましたが、解決方法は私の場合には役に立たないみたいです。助けてください!

macでmecab-python3のimport error(Symbol not found)を解決

% curl -OL https://github.com/taku910/cabocha/archive/master.zip
% unzip master.zip
% cd cabocha-master
% pip install python/
/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 28, in <module>
    _CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

以下のページで似たような問題が記述されていましたが、解決方法は私の場合には役に立たないみたいです。

macでmecab-python3のimport error(Symbol not found)を解決

% otool -L /Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so

/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so:
        /usr/local/lib/libcrfpp.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        @rpath/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
        @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)
% ls /opt/homebrew/lib

libcrfpp.0.dylib        libcrfpp.dylib          libgmp.a                libgmpxx.4.dylib        libgmpxx.dylib
libcrfpp.a              libgmp.10.dylib         libgmp.dylib            libgmpxx.a              pkgconfig

install_tool_name -changeを使ってみると、

% install_name_tool -change "/usr/local/lib/libcrfpp.0.dylib" /opt/homebrew/lib/libcrfpp.0.dylib /Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so

% otool -L /Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so

/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so:
        /opt/homebrew/lib/libcrfpp.0.dylib (compatibility version 1.0.0, current version 1.0.0)
        @rpath/libiconv.2.dylib (compatibility version 9.0.0, current version 9.1.0)
        @rpath/libc++.1.dylib (compatibility version 1.0.0, current version 1.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1319.100.3)

結局同じエラーが出てきました。

/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 28, in <module>
    _CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

助けてください!

正しいcabocha-pythonをインストール方法を試す
ソース リンク
gitcurl clone-OL https://github.com/kenkovtaku910/cabocha/archive/master.zip
unzip master.zip
cd cabocha-master
pip install python/
Processing ./python
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: cabocha-python
  Building wheel for cabocha-python (setup.py) ... done
  Created wheel for cabocha-python: filename=cabocha_python-0.69-cp310-cp310-macosx_11_0_arm64.whl size=24383 sha256=a9c5035bf5d53158daf77308a32ed7fe15f4fab17f551cbc3807ba0a19bb62d1
  Stored in directory: /private/var/folders/26/9wdtrsyd4mxcx7wh7m398khc0000gn/T/pip-ephem-wheel-cache-268kjen1/wheels/e6/a3/17/93356be0304ed4b17e7d14180b217eacbd9c7075cb4065f167
Successfully built cabocha-python
Installing collected packages: cabocha-python
Successfully installed cabocha-python-0.69
/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 1528, in <module>
    import_CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'
git clone https://github.com/kenkov/cabocha
pip install cabocha/
/Users/hurui05/anaconda3/bin/python /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 15, in <module>
    import _CaboCha
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'
curl -OL https://github.com/taku910/cabocha/archive/master.zip
unzip master.zip
cd cabocha-master
pip install python/
Processing ./python
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: cabocha-python
  Building wheel for cabocha-python (setup.py) ... done
  Created wheel for cabocha-python: filename=cabocha_python-0.69-cp310-cp310-macosx_11_0_arm64.whl size=24383 sha256=a9c5035bf5d53158daf77308a32ed7fe15f4fab17f551cbc3807ba0a19bb62d1
  Stored in directory: /private/var/folders/26/9wdtrsyd4mxcx7wh7m398khc0000gn/T/pip-ephem-wheel-cache-268kjen1/wheels/e6/a3/17/93356be0304ed4b17e7d14180b217eacbd9c7075cb4065f167
Successfully built cabocha-python
Installing collected packages: cabocha-python
Successfully installed cabocha-python-0.69
/Users/hurui05/anaconda3/bin/python3.10 /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 28, in <module>
    _CaboCha = swig_import_helper()
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 24, in swig_import_helper
    _mod = imp.load_module('_CaboCha', fp, pathname, description)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 243, in load_module
    return load_dynamic(name, filename, file)
  File "/Users/hurui05/anaconda3/lib/python3.10/imp.py", line 343, in load_dynamic
    return _load(spec)
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'
本文に 105 文字追加
ソース リンク
cubick
  • 2.1万
  • 5
  • 27
  • 64

日本語が苦手で用語が曖昧かもしれません。お許しください。

このページMeCabとCaboChaをMacに導入してPythonから使ってみる

上記ページに参考してcabocha-pythonをMacで使いたいんです。コマンドラインでCabochaが使えますが、以下のコマンドでインストールしたPythonバインディングでPythonから使えないです。

以下のコマンドでcabocha-pythonをインストールできました。

git clone https://github.com/kenkov/cabocha
pip install cabocha/

でも、実際に使ってみると、エラーが出てきました。

/Users/hurui05/anaconda3/bin/python /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 15, in <module>
    import _CaboCha
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

このページも似た 以下のページで似たような問題が記述されていましたが、解決方法は私の場合には役に立て立たないみたいです。

助け助けてください!

macでmecab-python3のimport error(Symbol not found)を解決

日本語が苦手で用語が曖昧かもしれません。お許しください。

このページに参考してcabocha-pythonをMacで使いたいんです。コマンドラインでCabochaが使えますが、以下のコマンドでインストールしたPythonバインディングでPythonから使えないです。

以下のコマンドでcabocha-pythonをインストールできました。

git clone https://github.com/kenkov/cabocha
pip install cabocha/

でも、実際に使ってみると、エラーが出てきました。

/Users/hurui05/anaconda3/bin/python /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 15, in <module>
    import _CaboCha
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

このページも似たような問題が記述されましたが、解決方法は私の場合には役に立てないみたいです。

助けてください!

日本語が苦手で用語が曖昧かもしれません。お許しください。

MeCabとCaboChaをMacに導入してPythonから使ってみる

上記ページに参考してcabocha-pythonをMacで使いたいんです。コマンドラインでCabochaが使えますが、以下のコマンドでインストールしたPythonバインディングでPythonから使えないです。

以下のコマンドでcabocha-pythonをインストールできました。

git clone https://github.com/kenkov/cabocha
pip install cabocha/

でも、実際に使ってみると、エラーが出てきました。

/Users/hurui05/anaconda3/bin/python /Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py
Traceback (most recent call last):
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 781, in <module>
    run_cabocha_demo()
  File "/Users/hurui05/Desktop/mecab/frontend/src/cleaners/pseudo_cleaner.py", line 749, in run_cabocha_demo
    import CaboCha
  File "/Users/hurui05/anaconda3/lib/python3.10/site-packages/CaboCha.py", line 15, in <module>
    import _CaboCha
ImportError: dlopen(/Users/hurui05/anaconda3/lib/python3.10/site-packages/_CaboCha.cpython-310-darwin.so, 0x0002): symbol not found in flat namespace '__ZN7CaboCha12createParserEPKc'

以下のページで似たような問題が記述されていましたが、解決方法は私の場合には役に立たないみたいです。助けてください!

macでmecab-python3のimport error(Symbol not found)を解決

タグを編集
リンク
cubick
  • 2.1万
  • 5
  • 27
  • 64
読み込んでいます
ソース リンク
読み込んでいます