# Vectorbt No Alpaca module erorr

**URL:** <https://forum.alpaca.markets/t/vectorbt-no-alpaca-module-erorr/11160>\
**Category:** Getting Started with Alpaca\
**Created:** [November 24, 2022, 7:34pm UTC](https://forum.alpaca.markets/t/vectorbt-no-alpaca-module-erorr/11160 "2022-11-24T19:34:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Timmothy\_Sanders](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/timmothy_sanders/32/1631_2.png) [@Timmothy\_Sanders](https://forum.alpaca.markets/u/Timmothy_Sanders)\
**Post date:** [November 24, 2022, 7:34pm UTC](https://forum.alpaca.markets/t/vectorbt-no-alpaca-module-erorr/11160/1 "2022-11-24T19:34:23Z")

</div>

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:

[![](https://us1.discourse-cdn.com/flex020/uploads/alp/original/2X/f/f8f9b50187fc4a7c9130fc725fba0293ff3515ee.jpeg "Walk Forward Optimization with VectorBT and Alpaca") ](https://www.youtube.com/watch?v=GowmmrSMw9I)

> **[GitHub - hackingthemarkets/walk-forward-optimization](https://github.com/hackingthemarkets/walk-forward-optimization)**
>
> Contribute to hackingthemarkets/walk-forward-optimization development by creating an account on GitHub.

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:

```auto
Traceback (most recent call last):
  File "C:~", line 7, in <module>
    data = vbt.AlpacaData.download('SPY', start='2016-01-01', end='2021-12-15', timeframe='1d', limit=10000)
  File "~ectorbt\data\base.py", line 584, in download
    data[s] = cls.download_symbol(s, **_kwargs)
  File "~vectorbt\data\custom.py", line 849, in download_symbol
    from alpaca_trade_api.rest 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?

**UPDATE:**  
When I run as python3 XX.py it returns the error  
When I run as python XX.py, 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
