gpt4 book ai didi

python - 运行 'ipython notebook' 得到 [Errno 49] 无法分配请求的地址

转载 作者:太空狗 更新时间:2023-10-29 20:36:30 27 4
gpt4 key购买 nike

我使用的是 Mac OS 10.10.4。当我从命令行运行 ipython notebook 时,它给我一个错误 Cannot bind to localhost, using 127.0.0.1 as default ip [Errno 49] Can't assign requested address :

Yans-MacBook-Pro:/ yanyang$ ipython notebook
[W 01:32:12.908 NotebookApp] Cannot bind to localhost, using 127.0.0.1 as default ip
[Errno 49] Can't assign requested address
[I 01:32:12.912 NotebookApp] Serving notebooks from local directory: /
[I 01:32:12.913 NotebookApp] 0 active kernels
[I 01:32:12.913 NotebookApp] The IPython Notebook is running at: http://127.0.0.1:8888/
[I 01:32:12.913 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).

以后会导致更多的错误。我该如何解决?

localhost:~ yanyang$ lsof | grep 8888
Google 358 yanyang txt REG 1,4 16621568 26888859 /Users/yanyang/Library/Caches/Google/Chrome/Profile 5/Cache/data_4
Google 358 yanyang 90u REG 1,4 16621568 26888859 /Users/yanyang/Library/Caches/Google/Chrome/Profile 5/Cache/data_4
Google 358 yanyang 205u REG 1,4 3072 35352297 /Users/yanyang/Library/Application Support/Google/Chrome/Profile 5/Local Storage/http_127.0.0.1_8888.localstorage

上述 block 最后一行的文件内容:

?????z!11?tableItemTableItemTableCREATE TABLE ItemTable (key TEXT UNIQUE ON CONFLICT REPLACE, value BLOB NOT NULL ON CONFLICT FAIL)[!}1indexsqlite_aut?S???widgets:http://127.0.0.1:8888/notebooks/Downloads/PhillyCrime.ipynb{}?*?Qwidgets:http://127.0.0.1:8888/notebooks/Users/yanyang/Downloads/PhillyCrime.ipynb{}
??X?
?widgets:http://127.0.0.1:8888/notebooks/Downloads/PhillyCrime.ipynb?&?Q widgets:http://127.0.0.1:8888/notebooks/Users/yanyang/Downloads/PhillyCrime.ipynb

最佳答案

感谢@Petesh,我现在可以使用 ipython 笔记本了,使用下面的命令:

ipython notebook --ip=127.0.0.1

为了进一步解决,我发现在我的 Mac 的“/etc/hosts”中,127.0.0.1 没有设置为 localhost。这是最终的解决方案。

关于python - 运行 'ipython notebook' 得到 [Errno 49] 无法分配请求的地址,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35117031/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com