Reputation: 1
I've recently been trying to follow a Data Science Project course online to get more accustomed to projects. I have three import statements right now, and I've tried basically every variation of pip install in both the Python terminal and my CPU terminal. However, I still get the error
ModuleNotFoundError: No module named 'yfinance'.
I've looked online for solutions, but I can't find any that address this problem. Any ideas as to what this could be?
import yfinance as yf
import streamlit as st
import pandas as pd
Upvotes: 0
Views: 5553
Reputation: 1
I tried that but did not work for me April/2023. I did this instead;
!pip install -r requirements.txt
requirements.txt content base for yfinance. Content:
numpy
panda
requests
lxml
python.exe -m pip install --upgrade pip
Yes, better yfinance not problem is gone, now it complaints at another library but yfinance problem is gone.)
Upvotes: 0
Reputation: 133
I had to run the following command:
python3 -m pip install yfinance
The -m tells it to install the module.
Just make sure you are using right command for the version of python terminal you are using and do apt-get update.
Upvotes: 1