如下两种import方式都报错
matplot版本是matplotlib-2.2.2-cp36-cp36m-win_amd64.whl
网上说matplotlib2.0.2之后没有matplotlib.finance,改成mpl_finance了。但mpl_finance里没有quotes_historical_yahoo,如何解决呢?
1. from matplotlib.finance import quotes_historical_yahoo
Traceback (most recent call last):
File "pair.py", line 2, in
from matplotlib.finance import quotes_historical_yahoo
ModuleNotFoundError: No module named 'matplotlib.finance'
提示matplotlib下面没有finance了
2. from mpl_finance import quotes_historical_yahoo_ochl
Traceback (most recent call last):
File "pair.py", line 4, in
from mpl_finance import quotes_historical_yahoo_ochl
ImportError: cannot import name 'quotes_historical_yahoo_ochl'
改用mpl_finance,但里面没有quotes_historical_yahoo 或 quotes_historical_yahoo_ochl
https://blog.csdn.net/lzkmylz/article/details/51830913
换成 quotes_historical_yahoo_ochl
使用 pip install 试试
在cmd下用 python -m pip install quotes_historical_yahoo试试(网络畅通情况下)