在 python 上成功安装 streamlit 库但运行后,
我收到属性错误:模块“plotly.graph_objs.layout.template.data”没有属性“Icicle”
File "/home/appuser/venv/bin/streamlit", line 5, in <module>
from streamlit.web.cli import main
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/__init__.py", line 55, in <module>
from streamlit.delta_generator import DeltaGenerator as _DeltaGenerator
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/delta_generator.py", line 75, in <module>
from streamlit.elements.plotly_chart import PlotlyMixin
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/elements/plotly_chart.py", line 41, in <module>
import streamlit.elements.lib.streamlit_plotly_theme
File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/elements/lib/streamlit_plotly_theme.py", line 116, in <module>
go.layout.template.data.Icicle(textfont=go.icicle.Textfont(color="white"))
File "/home/appuser/venv/lib/python3.9/site-packages/_plotly_utils/importers.py", line 39, in __getattr__
raise AttributeError(
AttributeError: module 'plotly.graph_objs.layout.template.data' has no attribute 'Icicle'
请告诉我如何摆脱这个错误
我有同样的问题。 请卸载它并安装 streamlit 1.14.0
有同样的问题。无法升级到 1.18。但适用于 1.14.0
问题是你的情节版本太旧了。冰柱图在 Plotly 5.0.0 中发布。所以需要安装plotly >= 5.0.0.
的版本