fhamborg / Giveme5W1H

Extraction of the journalistic five W and one H questions (5W1H) from news articles: who did what, when, where, why, and how?
Apache License 2.0
512 stars 89 forks source link

Fails to install after 'giveme5w1h-corenlp install' #45

Open sidharth3 opened 4 years ago

sidharth3 commented 4 years ago

I was trying the installation process as described in the readme. However after the second line, I run into an error and am unable to figure out why. Please help.

Desktop % giveme5w1h-corenlp install mkdir: runtime-resources: File exists Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.8/bin/giveme5w1h-corenlp", line 11, in load_entry_point('giveme5w1h==1.0.17', 'console_scripts', 'giveme5w1h-corenlp')() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Giveme5W1H/examples/startup/environment.py", line 9, in start RuntimeResourcesInstaller.check_and_install() File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/Giveme5W1H/examples/startup/util.py", line 54, in check_and_install check_output(cmd, shell=True, cwd=path_giveme5w_installation) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 411, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command 'mkdir runtime-resources && cd runtime-resources && wget http://nlp.stanford.edu/software/stanford-corenlp-full-2017-06-09.zip && unzip stanford-corenlp-full-2017-06-09.zip && rm stanford-corenlp-full-2017-06-09.zip && wget http://nlp.stanford.edu/software/stanford-english-corenlp-2017-06-09-models.jar && mv stanford-english-corenlp-2017-06-09-models.jar stanford-corenlp-full-2017-06-09/ && cd ..' returned non-zero exit status 1.

Versions (please complete the following information):

MichaelAGunn commented 4 years ago

What I did to install it was to download version 3.5.2 here: https://stanfordnlp.github.io/CoreNLP/history.html then I extracted the package and the terminal, I went to the directory containing the extracted folder and typed the command there. I also had to install Java 11, but I think 8 would have worked as well.

sidharth3 commented 4 years ago

What command did you type after going to the directory that contained the extracted folder?

fhamborg commented 4 years ago

Interesting. Could you execute the commands that are failing manually, i.e., from a shell, and post the output here?

mkdir runtime-resources
cd runtime-resources
wget http://nlp.stanford.edu/software/stanford-corenlp-full-2017-06-09.zip
unzip stanford-corenlp-full-2017-06-09.zip
rm stanford-corenlp-full-2017-06-09.zip
wget http://nlp.stanford.edu/software/stanford-english-corenlp-2017-06-09-models.jar
mv stanford-english-corenlp-2017-06-09-models.jar stanford-corenlp-full-2017-06-09/ 
fhamborg commented 4 years ago

@sidharth3 you got any info on this?

K-Dasu commented 4 years ago

I had this same issue as @sidharth3 described ( I am using OSX 10.15.3 and python 3.7 ). I have the same error log following mkdir: runtime-resources: File exists.

The root of my issue was I did not have wget installed prior to running the command giveme5w1h-corenlp install. I didn't realize wget was not installed on this machine till I removed the folder runtime-resources and re-ran the install and got the error message wget: command not found. After installing wget I had to remove the runtime-resources folder again in order for the install to go through, otherwise I would get the same error messages starting with mkdir: runtime-resources: File exists.

The runtime-resources folder was located at /usr/local/lib/python3.7/site-packages/Giveme5W1H/ I hope this helps anyone who has this issue.

fhamborg commented 4 years ago

@K-Dasu it seems that the root cause of your issue might be a different one, e.g., that wget does not exist? crosslinking to the windows installation issue, which seems to be related https://github.com/fhamborg/Giveme5W1H/issues/33

PepijnBoers commented 4 years ago

I had the same issue, @K-Dasu 's comment resolved the problem.