Luis Alfonso
Luis Alfonso

Reputation: 31

ModuleNotFoundError: No module named 'alpaca_trade_api'

I am working with Atom in a trade-bot with Alpacas, and tried to intstall the Alpacas library with $ pip3 install alpaca-trade-api, as shown in the Github page (https://github.com/alpacahq/alpaca-trade-api-python), but when i try to run it with import alpaca_trade_api as tradeapi , the terminal shows ModuleNotFoundError: No module named 'alpaca_trade_api' .

---------------------------------------------------------------------------
ModuleNotFoundError                       Traceback (most recent call last)
<ipython-input-5-af2e0ff0b3ba> in <module>
----> 1 import alpaca_trade_api as tradeapi

ModuleNotFoundError: No module named 'alpaca_trade_api'

Upvotes: 2

Views: 8777

Answers (2)

blissweb
blissweb

Reputation: 3863

I solved it with

pip install alpaca_trade_api

instead of

pip3 install alpaca_trade_api (mentioned in medium tutorial)

I'm using anaconda

Upvotes: 3

Abyn Jesus
Abyn Jesus

Reputation: 1

I have had the same issue while trying ALpaca API read.

"pip install alpaca_trade_api" solved the issue for me.

Upvotes: 0

Related Questions