I want to install pysummarization using mecab-python-windows.

Asked 2 years ago, Updated 2 years ago, 94 views

 (base) C:\...> pip install pysummarization
Collecting pysummarization
Using cached pysummarization-1.0.5.tar.gz
Requirement already satified: numpy inc:\...\appdata\local\continuum\anaconda3\lib\site-packages (from pysummarization)
Requirement already satified: nltkinc:\...\appdata\local\continuum\anaconda3\lib\site-packages (from pysummarization)
Collecting mecab-python 3 (from pysummarization)
Using cached mecab-python3-0.7.tar.gz
Complete output from command python setup.py eg_info:
'mecab-config' is not recognized as an internal or external command,
operable program or batch file.
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\...\AppData\Local\Temp\pipe-build-h1_o01fh\mecab-python3\setup.py", line 41, in <module>
    include_dirs=cmd2("mecab-config --inc-dir"),
  File "C:\...\AppData\Local\Temp\pipe-build-h1_o01fh\mecab-python3\setup.py", line 21, in cmd2
    return cmd1(string).split()
  File "C:\...\AppData\Local\Temp\pipe-build-h1_o01fh\mecab-python3\setup.py", line 18, in cmd1
    returnos.popen(string).readlines()[0][:-1]
IndexError:list index out of range
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in C:\...\AppData\Local\Temp\pipe-build-h1_o01fh\mecab-python3\

As mentioned above, I wanted to install "pysummarization", so I tried "pip install pysummarization", but an error occurred.

I looked it up on the Internet and tried many things, but it didn't work out the way I wanted it to.

The mecab required for pysummarization includes the following:

 pip list
>mecab-python-windows (0.996.0)

My environment is as follows.

Windows 7 (32bit)
python 3.6.4

Who can tell me how to avoid this error?

Thank you for your cooperation.

python python3 mecab

2022-09-29 21:26

1 Answers

pysummarization depends on mecab-python3, so I try to install mecab-python3, but mecab-python3 is not Windows-enabled, so I get an error.

mecab-python-windows is a package that allows you to easily put mecab-python in pip even in Windows. mecab-python3 should have a modification to mecab-python-windows but it seems unlikely to happen soon.Change to n-windows to allow installation.

However, compiling the mecab-python-windows from the source can be troublesome, so the simple solution is to create and install a dummy package called mecab-python3 to deceive the installer.

To create it, https://github.com/pypa/sampleproject has a Python Packing template, so download it in ZIP and modify the name from 'sampleproject' to 'mecab-python'.

name='sampleproject',#Required

Once modified, you can easily install it in pip install as follows:Once created, this method can be used when mecab-python is required except for pysummarization.

 pip install sampleproject-master.zip


2022-09-29 21:26

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.