I have downloaded the anaconda. Create a python virtual environment using conda activate quantra_py
After which, I entered jupyter notebook in the anaconda command prompt but when I open the file import Data from Web sources.ipynb, I received an error after running the code.
Eror message stated:
ModuleNotFoundError: No module named 'yfinance'
How do I resolve this error? I cant find the link for downloading the required python packages.
Hi,
I tried to replicate the same process and it seems to work in my system. Ideally, the yahoo finance library should have been installed when you set up the virtual environment.
Even after the command, "import yfinance as yf" gives the same error, we can install the yahoo finance library in the environment by adding a new code cell and running the following command:
!pip install yfinance
This can be done in the jupyter notebook itself. And then try importing it with the command, import yfinance as yf.
Then, you should be able to retrieve the data from yfinance library.
Hope this helps.