Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/290.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python &引用;错误:无法在端口9000上启动CoreNLP服务器;无法通过节使用stanfordcorenlp_Python_Stanford Nlp_Stanza - Fatal编程技术网

Python &引用;错误:无法在端口9000上启动CoreNLP服务器;无法通过节使用stanfordcorenlp

Python &引用;错误:无法在端口9000上启动CoreNLP服务器;无法通过节使用stanfordcorenlp,python,stanford-nlp,stanza,Python,Stanford Nlp,Stanza,我试图通过stanza使用stanfordcorenlp,并将它们安装在anaconda中。但当我尝试运行它时,我总是 OSError Traceback (most recent call last) /opt/anaconda3/lib/python3.7/site-packages/stanza/server/client.py in start(self) 130 try:

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

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
在处理上述异常期间,发生了另一个异常:

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)
permanentlyfailedeexception回溯(最近一次调用)
在里面
4个注释器=['tokenize'、'ssplit'、'pos'、'lemma'、'ner'、'parse'、'depprase'、'coref'],
5超时=30000,
---->6内存='16G')作为客户端:
7 ann=客户端注释(文本)
/opt/anaconda3/lib/python3.7/site-packages/stanza/server/client.py in\uuuuu enter\uuuu(self)
174
175定义输入(自我):
-->176自我启动()
177回归自我
178
/开始时的opt/anaconda3/lib/python3.7/site-packages/stanza/server/client.py(self)
137.其他:
138引发永久FailedException(“错误:无法在端口%d上启动CoreNLP服务器”
-->139“(可能已经有东西在那里运行)”%self.port)
140如果自己保持安静:
141#问题#26:python 2.7不支持subprocess.DEVNULL。
PermanentlyFailedException:错误:无法在端口9000上启动CoreNLP服务器(可能已经在那里运行了)

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

您还有其他东西占用端口9000。这可能是以前尝试运行CoreNLP服务器或其他操作

您应该确保没有任何CoreNLP服务器正在运行


如果您的机器上的其他东西正在占用端口9000,您可以随时更改CONELP服务器使用的端口,使用<代码>端口< /C> >参数。

您应该考虑格式化这个问题。现在几乎看不懂。