我已經streamlit在我的 Mac 上安裝
我嘗試切換到 Brave Browser 和 Firefox,但我得到了同樣的錯誤。
從其他 SO 問題中,我嘗試了以下方法:
? apachectl configtest
AH00557: httpd: apr_sockaddr_info_get() failed for Lucas-MacBook-Air.local
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1. Set the 'ServerName' directive globally to suppress this message
Syntax OK
我也跑了這個:
ps -ax | grep 'httpd'
124 ?? 0:00.85 /usr/sbin/httpd -D FOREGROUND
517 ?? 0:00.00 /usr/sbin/httpd -D FOREGROUND
6627 ttys002 0:00.01 grep httpd
我嘗試啟動其他創建本地服務器的東西,例如 Jupyter Notebooks,它們可以作業。
uj5u.com熱心網友回復:
問題是已知的:在撰寫本文時streamlit 不支持,pdm正如@cye18 在 pdm 的 github 頁面上打開的并行問題中提到的那樣。
問題是,雖然streamlit配置默認為 server port 8501,但服務器是在 port 上啟動的3000。您可以通過兩種方式強制執行此行為。
第一種是通過手動更改 streamlit 的設定,該設定位于~/.streamlit/config.toml您的專案目錄中或本地。
[server]
serverPort = 8501
streamlit或者,您可以在啟動命令時將以下標志添加到命令中:
pdm run streamlit run app.py --server.port 8501
無論哪種方式,streamlit都會抱怨說server.port does not work when global.developmentMode is true。再一次,這可以通過添加 flag 來解決--global.developmentMode false。最終命令將如下所示:pdm run streamlit run app.py --server.port 8501 --global.developmentMode false.
或者,本地設定將如下所示:
[server]
port = 8501
[global]
developmentMode = false
轉載請註明出處,本文鏈接:https://www.uj5u.com/qukuanlian/449848.html
