python - 错误 "Unable to open Jupyter Notebook: Port 8888 is already in use"

标签 python jupyter-notebook port

运行 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",我得到以下信息:

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?

最佳答案

端口 8888 几乎完全由 Jupyter 使用,它正在使用的事实最重要的是表明您有另一个 Jupyter session 已经在运行。我 99% 确定你可以杀死正在使用它的任务,或者你可以运行

jupyter notebook list

查看当前笔记本。正如另一个答案中提到的,您可以运行

jupyter notebook --port 8889

改为在不同的端口上运行(将 8889 替换为您想要的任何其他数字)。

关于python - 错误 "Unable to open Jupyter Notebook: Port 8888 is already in use",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51739199/

相关文章:

python-3.x - lightgbm || ValueError : Series. dtypes 必须是 int、float 或 bool

ipython - 以非交互方式运行 IPython/Jupyter 笔记本

python - 通过命令行将字典传递给 Python 脚本

python - 通过 Pandas 连接(许多)CSV 文件

Python函数去除小数点右边的零,包括小数点?

http - 端口被阻止时浏览器如何访问互联网

docker - 通过 telnet 连接到 docker 容器

python - Django Admin 没有这样的表

Python Jupyter Notebook 无法打开文件,可能输出太大

Java Socket 服务器应用程序 : Getting the packet after long delay