[Solved]: ModuleNotFoundError: No module named 'fix_yahoo_finance'

I have this code:

# LinearRegression is a machine learning library for linear regressionfrom sklearn.linear_model import LinearRegression# pandas and numpy are used for data manipulationimport pandas as pdimport numpy as np# matplotlib and seaborn are used for plotting graphsimport matplotlib.pyplot as pltimport seaborn# fix_yahoo_finance is used to fetch dataimport fix_yahoo_finance as yf

I am getting this error:

---------------------------------------------------------------------------ModuleNotFoundError                       Traceback (most recent call last) in ()     17 # fix_yahoo_finance is used to fetch data     18 ---> 19 import fix_yahoo_finance as yfModuleNotFoundError: No module named 'fix_yahoo_finance'

Solution: Install Yahoo finance:

pip install fix-yahoo-finance