首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >“错误:无法在端口9000上启动CoreNLP服务器”无法通过节使用stanfordcorenlp

“错误:无法在端口9000上启动CoreNLP服务器”无法通过节使用stanfordcorenlp
EN

Stack Overflow用户
提问于 2020-09-16 20:46:52
回答 1查看 424关注 0票数 0

我尝试通过stanza使用stanfordcorenlp,并将它们安装在anaconda中。但是当我尝试运行它的时候,我总是得到

代码语言:javascript
运行
复制
OSError                                   Traceback (most recent call last)
/opt/anaconda3/lib/python3.7/site-packages/stanza/server/client.py in start(self)
    130                     try:
--> 131                         sock.bind((self.host, self.port))
    132                     except socket.error:

OSError: [Errno 48] Address already in use

在处理上述异常的过程中,发生了另一个异常:

代码语言:javascript
运行
复制
PermanentlyFailedException                Traceback (most recent call last)
<ipython-input-1-521fed6e064f> in <module>
      4         annotators=['tokenize','ssplit','pos','lemma','ner', 'parse', 'depparse','coref'],
      5         timeout=30000,
----> 6         memory='16G') as client:
      7     ann = client.annotate(text)

/opt/anaconda3/lib/python3.7/site-packages/stanza/server/client.py in __enter__(self)
    174 
    175     def __enter__(self):
--> 176         self.start()
    177         return self
    178 

/opt/anaconda3/lib/python3.7/site-packages/stanza/server/client.py in start(self)
    137                         else:
    138                             raise PermanentlyFailedException("Error: unable to start the CoreNLP server on port %d "
--> 139                                                          "(possibly something is already running there)" % self.port)
    140             if self.be_quiet:
    141                 # Issue #26: subprocess.DEVNULL isn't supported in python 2.7.

PermanentlyFailedException: Error: unable to start the CoreNLP server on port 9000 (possibly something is already running there)

我也不知道发生了什么。请帮帮我!

EN

回答 1

Stack Overflow用户

发布于 2020-09-18 08:18:52

在端口9000上,您还有其他东西。这可能是之前尝试运行CoreNLP服务器或其他原因。

您应该确保没有任何已经在运行的CoreNLP服务器。

如果您的机器上有其他东西占用了端口9000,您可以随时使用port参数更改CoreNLP服务器使用的端口。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/63920397

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档