PacktPublishing/Artificial-Intelligence-with-Python

chapter04 stocks.py matplotlib.finance removed

hysic opened this issue · 0 comments

hysic commented

When running python stocks.py in Chapter 04, it prints:

Traceback (most recent call last):
  File "stocks.py", line 7, in <module>
    from matplotlib.finance import quotes_historical_yahoo_ochl as quotes_yahoo
ModuleNotFoundError: No module named 'matplotlib.finance'

It seems matplotlib.finance has been removed from matplotlib and trasferred to mpl_finance. Moreover, quotes_historical_yahoo_ochl is no longer available in this package due to frequent changes of Yahoo API.

I wonder if you could provide an alternative way to get the stock quotes data, so that the file can be correctly run.

Thank you.