ModuleNotFoundError: No module named 'smartapi'
-
Dear All,
i am getting the following error message while running my own build algo on Mac laptop.
"from smartapi import SmartConnect
ModuleNotFoundError: No module named 'smartapi'Please note i have already installed the below package but still getting the above error message.
pip install twisted
pip install smartapi-python
pip install websocket-clientAnyone who has face similar issue with MAC laptop ?
-
HI @Ramkrishna we suggest you to use anaconda for python development.
-
hi ,
i am also facing the same issue.import itself doesnt work .can anyone help here plz.
PS C:\Users\Lenovo\Desktop\History Data> & 'C:\Users\Lenovo\AppData\Local\Microsoft\WindowsApps\python.exe' 'c:\Users\Lenovo.vscode\extensions\ms-python.python-2021.9.1246542782\pythonFiles\lib\python\debugpy\launcher' '58178' '--' 'c:\Users\Lenovo\Desktop\History Data\test.py'
Traceback (most recent call last):
File "c:\Users\Lenovo\Desktop\History Data\test.py", line 1, in <module>
from smartapi.smartConnect import SmartConnect
ModuleNotFoundError: No module named 'smartapi'
PS C:\Users\Lenovo\Desktop\History Data> -
HI @puna123 you can follow below blog to solve above issue.
https://smartstore.angelbroking.com/blog/2021/08/16/walkthrough-of-the-smartapi-python-sdk-with-examples-2/ -
@admin ,
i tried everything . have install both the libraray as well but still same issue.
also want to confirmone thing - client id and username are same only right?? -
HI @puna123 Please connect with a expert software developer.Yes client code and user id is same.
-
Is there any solution for this error. Till yesterday, it was working now suddenly it stopped. I can see smartapi is already installed in my venv, but still it says No module 'smartapi'
-
@sunilsahub4u thanks for your message i was able to debug the issue. i uninstalled smarapi and reinstalled with pip install smartapi-python==1.3.4
now the code is working for me -
-
@balaji-k-subash It is working. Thanks