Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Module is not found

Tags:

python

pip

I used this command line in the terminal to get the module:

$ pip install yahoo-finance

I used this code to check the module was imported correctly, but it says there no module called yahoo_finance

from yahoo_finance import Share
yahoo = Share('YHOO')
print (yahoo.get_price())

What am I missing?


1 Answers

Check if you use the right version of python

pip install install library to modules of python 2 while your code is using python3.

Try to use

$ pip3 install yahoo-finance
like image 133
Hùng Nguyễn Avatar answered Oct 19 '25 06:10

Hùng Nguyễn