import pandas as pd
from aplha_vantage.timeseries import TimeSeries
import time
api_key = '*************'
ts = TimeSeries(key=api_key, output_format='pandas')
data, meta_data = ts.get_intraday(symbol='MSFT', interval = '1min', output_size = 'full')
print(data)
When I try to pull the data into the terminal it gives me a ModuleNotFoundError on alpha_vantage even though I had installed it using terminal.
I'm using pycharm and python 3.9
It depends on what interpreter pycharm is using. Do this:
Open Pycharm
Hit "file" and look for "settings" or "other settings"
Click then then look for something with "preferences"
Now look for "project interpreter"
You now you can do one of two things
Add the package yourself to the interpreter
a. There is a little plus button at the bottom you can hit, and add "alpha-vantage"
Make the pycharm interpreter the same as your command line interpreter (the thing you did
pip install alpha-vantageon)b. You can find out what interpreter you're using with
which pythonon the command line, and just make them the same.