错误“无法打开Jupyter笔记本:端口8888已在使用中" [英] Error "Unable to open Jupyter Notebook: Port 8888 is already in use"
问题描述
运行Jupyter Notebook时出现以下错误:
I am getting following error when I run Jupyter Notebook:
(base) C:\Users\ramne>jupyter notebook
[I 01:19:00.648 NotebookApp] The port 8888 is already in use, trying another port.
当我执行netstat -ano时|找到Str"8888",我得到以下信息:
And when I do netstat -ano | find Str "8888" , I get the following:
C:\Users\ramne>netstat -ano | findStr "8888"
TCP 127.0.0.1:8888 0.0.0.0:0 LISTENING 16024
TCP [::1]:8888 [::]:0 LISTENING 16024
我不知道端口8888的默认连接是什么或它的行为应该是什么样的.如何解决此错误,以便我可以打开Jupyter Notebook?
I don't know what the default connection of port 8888 is or what its behavior should be like. How do I fix this error so I can open Jupyter Notebook?
推荐答案
端口8888几乎完全由Jupyter使用,而使用该端口的事实表明您已经在运行另一个Jupyter会话,这一点比任何其他事情都重要.我99%肯定您可以杀死正在使用它的任务,或者可以运行
The port 8888 is used almost exclusively by Jupyter, and the fact that it's in use indicates more than anything that you have another Jupyter session already running. I'm 99% certain you can just kill the task that's using it, or you can run
jupyter notebook list
查看当前笔记本.如另一个答案中所述,您可以运行
to see current notebooks. And as mentioned in the other answer you can run
jupyter notebook --port 8889
改为在其他端口上运行(将8889替换为您想要的任何其他数字).
To run on a different port instead (replace 8889 by any other number you'd like).
这篇关于错误“无法打开Jupyter笔记本:端口8888已在使用中"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!