Navigation

    SmartAPI Forum
    • Register
    • Login
    • Search
    • Categories
    • Popular
    • Groups
    • FAQs
    • API Docs

    ModuleNotFoundError: No module named 'smartapi'

    Python SDK
    3
    10
    333
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R
      Ramkrishna last edited by

      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-client

      Anyone who has face similar issue with MAC laptop ?

      A 1 Reply Last reply Reply Quote 0
      • A
        admin @Ramkrishna last edited by

        HI @Ramkrishna we suggest you to use anaconda for python development.

        1 Reply Last reply Reply Quote 0
        • P
          puna123 last edited by

          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>

          A 1 Reply Last reply Reply Quote 0
          • A
            admin @puna123 last edited by

            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/

            P 1 Reply Last reply Reply Quote 0
            • P
              puna123 @admin last edited by

              @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??

              A P 2 Replies Last reply Reply Quote 0
              • A
                admin @puna123 last edited by

                HI @puna123 Please connect with a expert software developer.Yes client code and user id is same.

                1 Reply Last reply Reply Quote 0
                • S
                  sunilsahub4u last edited by

                  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'

                  B 1 Reply Last reply Reply Quote 1
                  • B
                    balaji.k.subash @sunilsahub4u last edited by

                    @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

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      Prashant_Panchal @puna123 last edited by

                      @puna123 said in ModuleNotFoundError: No module named 'smartapi':

                      sern

                      Yes

                      1 Reply Last reply Reply Quote 0
                      • P
                        Prashant_Panchal @balaji.k.subash last edited by

                        @balaji-k-subash It is working. Thanks

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post