# Problem with importing module

**URL:** <https://forum.alpaca.markets/t/problem-with-importing-module/10816>\
**Category:** Getting Started with Alpaca\
**Created:** [October 13, 2022, 10:22am UTC](https://forum.alpaca.markets/t/problem-with-importing-module/10816 "2022-10-13T10:22:03Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![eitanrozenfeld2](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/eitanrozenfeld2/32/4712_2.png) [@eitanrozenfeld2](https://forum.alpaca.markets/u/eitanrozenfeld2)\
**Post date:** [October 13, 2022, 10:22am UTC](https://forum.alpaca.markets/t/problem-with-importing-module/10816/1 "2022-10-13T10:22:04Z")

</div>

Hi I got the "

> ModuleNotFoundError: No module named 'alpaca

"  
I’ve tried to install the package with the command " pip3 install alpaca " and I can see clearly that it has been installed but I keep getting that Error  
tried to google it but nothing helps

Thanks!

---

<div class="post-metadata">

**Author:** ![xwing](https://avatars.discourse-cdn.com/v4/letter/x/e19adc/32.png) [@xwing](https://forum.alpaca.markets/u/xwing)\
**Post date:** [October 13, 2022, 5:40pm UTC](https://forum.alpaca.markets/t/problem-with-importing-module/10816/2 "2022-10-13T17:40:33Z")

</div>

I encountered the same problem at first.

Make sure you are using the right version of python when running your program.

First I would run the following commend:

```auto
pip3 --version

```

This output which version of Python is associated with pip3. That is the same version of Python that the script/program should be running for it to work.

So if you installed alpaca-py for Python3.9, but your program is set to run with Python3.8, it will not work.

EDIT: I want to clarify as well. When you did `pip3 install alpaca` that won’t work. The module name is `alpaca-py` Make sure you run `pip3 install alpaca-py`

---

<div class="post-metadata">

**Author:** ![eitanrozenfeld2](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.alpaca.markets/eitanrozenfeld2/32/4712_2.png) [@eitanrozenfeld2](https://forum.alpaca.markets/u/eitanrozenfeld2)\
**Post date:** [October 14, 2022, 8:50am UTC](https://forum.alpaca.markets/t/problem-with-importing-module/10816/3 "2022-10-14T08:50:59Z")

</div>

Thank you for that answer!  
I run that command the got that my python’s version is 3.10  
and I made sure that I wrote it right.

And I found out that if I code through Visual Studio Code it works fine. but when I code on Pycharm or Jupiter Notebook it doesn’t.  
I got really confused about that problem

Edit :  
I’ve updated the version of my Jupiter and that solved it, but on Pycharm it still doesn’t work  
guess I’ll code on visual for a while 😅

---

<div class="post-metadata">

**Author:** ![xwing](https://avatars.discourse-cdn.com/v4/letter/x/e19adc/32.png) [@xwing](https://forum.alpaca.markets/u/xwing)\
**Post date:** [October 14, 2022, 7:06pm UTC](https://forum.alpaca.markets/t/problem-with-importing-module/10816/4 "2022-10-14T19:06:09Z")

</div>

Glad you got it sorta working. I code on PyCharm primarily so I remember having to change and mess around with some settings for the virtual environment (venv) to get it to work properly.
