Vectorbt No Alpaca module erorr

Hello. I’m trying to get started with alpaca using vectorbt to call historical data. I’m using a clean github file from this video:

I’ve pip installed alpaca_trade_api

In the pip list I see:
alpaca-trade-api 2.3.0

I’ve installed these with both pip and pip3. I’m using Python 3.8.15, an anaconda environment, on windows 10.

When I run the code with my API keys I receive this error:

Traceback (most recent call last):
  File "C:~", line 7, in <module>
    data ='SPY', start='2016-01-01', end='2021-12-15', timeframe='1d', limit=10000)
  File "~ectorbt\data\", line 584, in download
    data[s] = cls.download_symbol(s, **_kwargs)
  File "~vectorbt\data\", line 849, in download_symbol
    from import TimeFrameUnit, TimeFrame, REST
**ModuleNotFoundError: No module named 'alpaca_trade_api'**

This seems like an issue I shouldn’t run into, considering I’ve installed the library and see it in my pip list. I’m not sure exactly where to go from here - any suggestions?

When I run as python3 it returns the error
When I run as python, it works…

So my issue is probably fixed for now. I suppose I’ll leave this here in case someone has commentary, or if another new person has the same issue

1 Like