【发布时间】:2022-10-16 11:16:47
【问题描述】:
我尝试运行一个简单的
import streamlit as st
st.write('Hello World')
它返回一个TypeError: Protocols cannot be instantiated. 发现一个类似的post 提到安装以前的版本,这导致了同样的错误。本地应用程序确实启动,但位于“请稍候...”屏幕上。
【问题讨论】:
-
你的python版本是什么?
-
同样的问题,在更新 streamlit 1.12.0,运行 python 3.9.7 后得到这个
-
我也在 3.9.7
-
您是否使用
streamlit run <name of your Python file>运行该应用程序? -
是的,我确认命令行的目录以及 .py 扩展名都是正确且存在的。
标签: python python-3.x streamlit