admin 發表於 2023-4-11 03:36:06

compiling issues

1 python使用matplotlib画蜡烛图时,找不到matplotlib.finance时的解决方案?
1.从matplotlib 2.2.0开始,matplotlib已经不包含finance模块。可以使用mpl_finance进行替代。2.mpl_finance库需要手动安装。安装方法: 在命令行使用:pip install mpl_finance 安装就好。3.WARNING: `mpl_finance` is deprecated:Please use `mplfinance` instead (no hyphen, no underscore).To install: `pip install --upgrade mplfinance`2.IndentationError:expected an indented block错误的解决办法?Python语言是一款对缩进非常敏感的语言,给很多初学者带来了困惑,即便是很有经验的Python程序员,也可能陷入陷阱当中。最常见的情况是tab和空格的混用会导致错误,或者缩进不对,而这是用肉眼无法分别的。

在编译时会出现这样的错IndentationError:expected an indented block说明此处需要缩进,你只要在出现错误的那一行,按空格或Tab(但不能混用)键缩进就行。
一句话 有冒号的下一行往往要缩进,该缩进就缩进

頁: [1]
查看完整版本: compiling issues