Follow these steps to set up CrewAI on your system.
- Ensure you have Python version >=3.10 and <=3.13 installed on your system.
- If Python is not installed or is not within the required version range, download the appropriate version from Python's official website.
- You can check the version of python and pip by running following commands.
python3 --version
pip --versionOpen your terminal and run the following command to install CrewAI:
pip install crewai crewai-toolsTo confirm that CrewAI was installed correctly, execute the following command in your terminal:
pip freeze | grep crewaiYou should see output similar to the following, which confirms the versions installed:
crewai==X.X.X
crewai-tools==X.X.X
Run this command to create a new CrewAI project. Replace <project_name> with your desired project name.
crewai create crew <project_name>Navigate to your project directory and set up your environment variables:
-
Change into your project directory:
cd <project_name>
-
Create a
.envfile and add your OpenAI API key (ensure it starts withsk-).echo "OPENAI_API_KEY=sk-..." > .env
Finally, install the necessary dependencies for your CrewAI project:
crewai installYour CrewAI project is now set up and ready for development!