SamuraiT / mecab-python3

:snake: mecab-python. you can find original version here:http://taku910.github.io/mecab/
https://pypi.python.org/pypi/mecab-python3
Other
541 stars 51 forks source link

Unable to install on Windows 10 x64 #77

Closed AniRayn closed 2 years ago

AniRayn commented 2 years ago

Python: 3.10.2 Pip: 22.0.3

Console output:

C:\Users\Admin>pip install mecab-python3
Defaulting to user installation because normal site-packages is not writeable
Collecting mecab-python3
  Using cached mecab-python3-1.0.4.tar.gz (78 kB)
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: mecab-python3
  Building wheel for mecab-python3 (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [10 lines of output]
      C:\Users\Admin\AppData\Roaming\Python\Python310\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running bdist_wheel
      running build
      running build_py
      running build_ext
      building 'MeCab._MeCab' extension
      MeCab_wrap.cpp
      src/MeCab/MeCab_wrap.cpp(3523): fatal error C1083: Cannot open include file: 'mecab.h': No such file or directory
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for mecab-python3
  Running setup.py clean for mecab-python3
Failed to build mecab-python3
Installing collected packages: mecab-python3
  Running setup.py install for mecab-python3 ... error
  error: subprocess-exited-with-error

  × Running setup.py install for mecab-python3 did not run successfully.
  │ exit code: 1
  ╰─> [12 lines of output]
      C:\Users\Admin\AppData\Roaming\Python\Python310\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer.
        warnings.warn(
      running install
      C:\Users\Admin\AppData\Roaming\Python\Python310\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      running build_ext
      building 'MeCab._MeCab' extension
      MeCab_wrap.cpp
      src/MeCab/MeCab_wrap.cpp(3523): fatal error C1083: Cannot open include file: 'mecab.h': No such file or directory
      error: command 'C:\\Program Files\\Microsoft Visual Studio\\2022\\Community\\VC\\Tools\\MSVC\\14.30.30705\\bin\\HostX86\\x64\\cl.exe' failed with exit code 2
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> mecab-python3

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.
polm commented 2 years ago

The issue is you're using Python 3.10 and I haven't released wheels for that yet.

I was working on that today, I'm waiting for confirmation on OSX arm64 wheels and then I'll make a release.

In the meantime you can use a lower version of Python (such as 3.9), or if you want to build from source you need to install MeCab yourself.

polm commented 2 years ago

This should be addressed by the most recent release, so I'll close this. If you're still having trouble let me know.