python - FormGroup 在 dash-bootstrap-components 版本 1.0.0 中已弃用
问题描述
我正在尝试在此处复制确切的代码。
当我运行时:
from jaal import Jaal
from jaal.datasets import load_got
# load the data
edge_df, node_df = load_got()
# init Jaal and run server
Jaal(edge_df, node_df).plot()
我得到的错误是:
FormGroup was deprecated in dash-bootstrap-components version 1.0.0. You are using 1.0.0. For more details please see the migration guide: https://dbc-v1.herokuapp.com/migration-guide/
从这里的迁移指南,我跟着'pip install "dash-bootstrap-components<1"'
正如建议的那样,它的安装方式是这样的:
Collecting dash-bootstrap-components<1
Downloading dash_bootstrap_components-0.13.1-py3-none-any.whl (197 kB)
|████████████████████████████████| 197 kB 2.0 MB/s eta 0:00:01
Requirement already satisfied: dash>=1.9.0 in ./anaconda/lib/python3.7/site-packages (from dash-bootstrap-components<1) (2.0.0)
Requirement already satisfied: flask-compress in ./anaconda/lib/python3.7/site-packages (from dash>=1.9.0->dash-bootstrap-components<1) (1.4.0)
Requirement already satisfied: Flask>=1.0.4 in ./anaconda/lib/python3.7/site-packages (from dash>=1.9.0->dash-bootstrap-components<1) (1.1.1)
Requirement already satisfied: dash-core-components==2.0.0 in ./anaconda/lib/python3.7/site-packages (from dash>=1.9.0->dash-bootstrap-components<1) (2.0.0)
Requirement already satisfied: dash-table==5.0.0 in ./anaconda/lib/python3.7/site-packages (from dash>=1.9.0->dash-bootstrap-components<1) (5.0.0)
Requirement already satisfied: dash-html-components==2.0.0 in ./anaconda/lib/python3.7/site-packages (from dash>=1.9.0->dash-bootstrap-components<1) (2.0.0)
Requirement already satisfied: plotly>=5.0.0 in ./anaconda/lib/python3.7/site-packages (from dash>=1.9.0->dash-bootstrap-components<1) (5.3.1)
Requirement already satisfied: Werkzeug>=0.15 in ./anaconda/lib/python3.7/site-packages (from Flask>=1.0.4->dash>=1.9.0->dash-bootstrap-components<1) (0.15.4)
Requirement already satisfied: Jinja2>=2.10.1 in ./anaconda/lib/python3.7/site-packages (from Flask>=1.0.4->dash>=1.9.0->dash-bootstrap-components<1) (2.10.1)
Requirement already satisfied: click>=5.1 in ./anaconda/lib/python3.7/site-packages (from Flask>=1.0.4->dash>=1.9.0->dash-bootstrap-components<1) (7.0)
Requirement already satisfied: itsdangerous>=0.24 in ./anaconda/lib/python3.7/site-packages (from Flask>=1.0.4->dash>=1.9.0->dash-bootstrap-components<1) (1.1.0)
Requirement already satisfied: MarkupSafe>=0.23 in ./anaconda/lib/python3.7/site-packages (from Jinja2>=2.10.1->Flask>=1.0.4->dash>=1.9.0->dash-bootstrap-components<1) (1.1.1)
Requirement already satisfied: tenacity>=6.2.0 in ./anaconda/lib/python3.7/site-packages (from plotly>=5.0.0->dash>=1.9.0->dash-bootstrap-components<1) (8.0.1)
Requirement already satisfied: six in ./anaconda/lib/python3.7/site-packages (from plotly>=5.0.0->dash>=1.9.0->dash-bootstrap-components<1) (1.15.0)
Installing collected packages: dash-bootstrap-components
Attempting uninstall: dash-bootstrap-components
Found existing installation: dash-bootstrap-components 1.0.0
Uninstalling dash-bootstrap-components-1.0.0:
Successfully uninstalled dash-bootstrap-components-1.0.0
Successfully installed dash-bootstrap-components-0.13.
但是当我重新运行上面的代码段来构建网络时,输出仍然是同样的错误。我正在使用 python 3.7.3,知道那是说我必须使用 3.6+。谁能解释如何解决这个问题?
解决方案
我尝试了 conda 环境:
conda install -c conda-forge "dash-bootstrap-components<1"
然后它开始工作了。
推荐阅读
- php - WordPress 循环,第一行 3 列,其余 4 列
- python - 使用 msvcrt.getwch() 时,Tkinter config() 不会更新 while 循环中的标签
- visual-studio - 有没有办法避免在我们关闭另一个文件时自动聚焦在打开的文件上的工作区?-- VisualStudio 代码 v1.46.0
- javascript - 如果我检测到窗口模糊并暂停视频,VIMEO 嵌入播放器的行为会很奇怪
- erlang - Erlang消息发送和接收与多个进程
- hadoop - Flume Twitter 流问题
- javascript - 几秒钟后隐藏项目
- javascript - Jest 测试中非默认类导出的模拟方法
- r - How can I export plots within a list in R?
- web-scraping - 刮擦属性。BeautifulSoup 锚点内的文本