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 hadcomposio0.1.1 pluscomposio-core0.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
No fix was confirmed in the thread; the issue was closed as completed without a verified resolution. The suggested workaround was to replace the
composiopackage withcomposio-core:pip uninstall composio -y pip install composio-coreAfter that, check what is actually installed:
pip show composio pip show composio-coreThe macOS reporter was on Python 3.12.7 (pyenv) with
composio0.1.0 installed. A Windows user later showedcomposio0.1.1, whichpipdescribed as a "Shim for composio-core", installed together withcomposio-core0.6.11.post1; on that machine thecomposiocommand 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
pipand thecomposioCLI come from the same Python interpreter or virtual environment, and avoid installing bothcomposioandcomposio-corein 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?What a GitHub user tried on GitHub (Didn't work)
Ran
composio add googledocson macOS with Python 3.12.7 (pyenv) and gotImportError: cannot import name 'Action' from 'composio'.Source: https://github.com/ComposioHQ/composio/issues/1115 (opens external site)
Did this work for you?What @tusharsadhwani tried on GitHub (Outcome unclear)
A commenter suggested
pip uninstall composio -yfollowed bypip install composio-core.Source: https://github.com/ComposioHQ/composio/issues/1115#issuecomment-2571354816 (opens external site)
Did this work for you?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?What @SakshiiKorat tried on GitHub (Outcome unclear)
On Windows, a user showed
composio0.1.1 (pip summary: 'Shim for composio-core') withcomposio-core0.6.11.post1 installed, and thecomposiocommand was not recognized on PATH.Source: https://github.com/ComposioHQ/composio/issues/1115#issuecomment-2576862034 (opens external site)
Did this work for you?
Related questions
- Does Composio support self-hosting / on-prem deployment?
- Composio initiateConnection error: Cannot read properties of null (reading 'join')
- Composio TS SDK v3: Zod error 'api_key should be a string, but you provided a undefined'
- Can I use Composio in a commercial app? Terms of use ambiguity
- How to fix ValueError: non-default argument follows default argument in composio_gemini?