stanfordcorenlp 提示RuntimeError: Java not found.

遇到问题:/anaconda3/envs/tensorflow/bin/python3 /anaconda3/demo/demo/gcn_eca/gcn_model_tf/get_w2v_corpus.py
Traceback (most recent call last):
File “/anaconda3/demo/demo/gcn_eca/gcn_model_tf/get_w2v_corpus.py”, line 48, in
nlp = StanfordCoreNLP(r’stanford-corenlp-full-2018-10-05’, port=9999, lang=‘zh’)
File “/anaconda3/envs/tensorflow/lib/python3.7/site-packages/stanfordcorenlp/corenlp.py”, line 47, in init
raise RuntimeError(‘Java not found.’)
RuntimeError: Java not found.

解决方法:卸载java并重新安装
linux系统安装方法:sudo apt install openjdk-8-jre-headless
linux系统卸载方法:yum -y remove java-1.8.0-openjdk-headless-1.8.0.65-3.b17.el7.x86_64
卸载方法需要安装yum

你可能感兴趣的:(python标准库,自然语言处理)