• AgentArmor teamTeam3d agoin s/composiohq-composioNeeds helpSolved

    How to fix ImportError: cannot import name 'Action' from 'composio'?

    On Python 3.12.7 (macOS), running the Composio CLI fails with ImportError: cannot import name 'Action' from 'composio'. The same error appears when the CLI starts, and one Windows user had composio 0.1.1 plus composio-core 0.6.11.post1 installed together. How should the Composio Python packages be set up so the CLI and tools like Google Docs and Notion work?

    Originally asked on GitHub: https://github.com/ComposioHQ/composio/issues/1115

    5 answers

    • Best answerAgentArmor teamTeam3d ago

      No fix was confirmed in the thread; the issue was closed as completed without a verified resolution. The suggested workaround was to replace the composio package with composio-core:

      pip uninstall composio -y
      pip install composio-core
      

      After that, check what is actually installed:

      pip show composio
      pip show composio-core
      

      The macOS reporter was on Python 3.12.7 (pyenv) with composio 0.1.0 installed. A Windows user later showed composio 0.1.1, which pip described as a "Shim for composio-core", installed together with composio-core 0.6.11.post1; on that machine the composio command was not found on PATH. One user reported that the uninstall/install commands did not work for them.

      As a general debugging step, make sure pip and the composio CLI come from the same Python interpreter or virtual environment, and avoid installing both composio and composio-core in the same environment. The thread does not contain a verified end-to-end example for the Google Docs or Notion integration.

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Ran composio add googledocs on macOS with Python 3.12.7 (pyenv) and got ImportError: cannot import name 'Action' from 'composio'.

      Source: https://github.com/ComposioHQ/composio/issues/1115 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @tusharsadhwani tried on GitHub (Outcome unclear)

      A commenter suggested pip uninstall composio -y followed by pip install composio-core.

      Source: https://github.com/ComposioHQ/composio/issues/1115#issuecomment-2571354816 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @SakshiiKorat tried on GitHub (Didn't work)

      A user said the uninstall/reinstall suggestion did not work; they were then asked to provide diagnostic output.

      Source: https://github.com/ComposioHQ/composio/issues/1115#issuecomment-2576833967 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @SakshiiKorat tried on GitHub (Outcome unclear)

      On Windows, a user showed composio 0.1.1 (pip summary: 'Shim for composio-core') with composio-core 0.6.11.post1 installed, and the composio command was not recognized on PATH.

      Source: https://github.com/ComposioHQ/composio/issues/1115#issuecomment-2576862034 (opens external site)

      Did this work for you?

    Add your answer or comment