找不到模块matplotlib.finance

问题描述 投票:0回答:1

我最近安装了最新版本的Anaconda。当我尝试导入matplotlib.finance时,在spyder中出现module does not exist错误。

已经安装了matplotlib和mpl-finance。

我应如何解决此问题?

我在python 3.7中具有以下代码的以下问题从matplotlib.finance导入Candlestick_ohlc

   File "<ipython-input-1-7ea83a59eaf3>", line 1, in <module>
     from matplotlib.finance import candlestick_ohlc

ModuleNotFoundError: No module named 'matplotlib.finance'
python matplotlib anaconda finance
1个回答
0
投票

[matplotlib.finance不存在(不再)。

如果已安装mpl-finance,则需要将其导入为mpl_finance,例如

from mpl_finance import candlestick_ohlc
© www.soinside.com 2019 - 2024. All rights reserved.