Installation of crewai fails

Hello,
I am trying to install crew ai with pip, but I get the followerror: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]

  Cargo, the Rust package manager, is not installed or is not on PATH.
  This package requires Rust and Cargo to compile extensions. Install it through
  the system's package manager or via https://rustup.rs/

  Checking for Rust toolchain....
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.ing error:
How can I resolve this?

1 Like

Thank for your question, @Alexander_Tashkov.

Can you share the contents of your pyproject file?

Also, what command are you using to install crewai?

check your python version. Python >=3.10 <=3.13

Hey Tony. I’m facing the same error.
The only thing that has an error in my pyproject file is this:
Preparing metadata (pyproject.toml) … error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [6 lines of output]

how do I resolve?

I am not trying to install it in a project. I tried installing it in the cmd. My python version is fine. I am using “pip install crewai”

What command did you run before getting this error?

After I finished pyproject I did poetry install --no-root, then for the .py file I did pip install crewai

I have even tried pip install --upgrade pip setuptools wheel and then
pip install crewai[all], but still getting the metadata-generation-failed error. kindly help

never mind, I have resolved. the culprit was the python version, I had to go back to python3.11

1 Like