gpt4 book ai didi

python - 无法访问 http ://0. 0.0.0:8000

转载 作者:行者123 更新时间:2023-12-02 16:10:50 24 4
gpt4 key购买 nike

我正在按照 https://fenics.readthedocs.io/projects/containers/en/latest/introduction.html 的指示进行操作.

我得到:

fenics@af86d2c8af46:~$ cd ~/demo/python/documented/poisson
fenics@af86d2c8af46:~/demo/python/documented/poisson$ python3 demo_poisson.py
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Calling FFC just-in-time (JIT) compiler, this may take some time.
Solving linear variational problem.
To view figure, visit http://0.0.0.0:8000
Press Ctrl+C to stop WebAgg server

但我打不开http://0.0.0.0:8000 (我试过 chrome、safari 和 firefox)。我也试过更换 0.0.0.0。使用我的 IP 地址或本地主机,但问题仍然存在。

编辑:我不确定这是否起作用,但如果我尝试 http://0.0.0.0:8000或 localhost:8000,我立即收到错误消息,但是当我用我的 IP 地址替换 0.0.0.0 时,我收到“浏览时间太长”的消息。

最佳答案

0.0.0.0 is not a real IP address .在此上下文中,它指定该服务可通过该计算机具有的任何 IPv4 地址访问。您可以通过 http://127.0.0.1:8000 连接到该服务。

您还需要将 docker 端口转发到主机:

docker run -p 8000:8000 -ti quay.io/fenicsproject/stable:latest

关于python - 无法访问 http ://0. 0.0.0:8000,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/68067843/

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