- CREW AI is a Python library for creating and training AI models. It provides a simple and intuitive API for building and deploying AI models.
- HERE'S THE CREW AI OFFICIAL DOCUMENTATIONSCrew_AI Documentation.
Before you start, make sure you have Python 3.10 or higher but less than 3.13. If you have Python 3.13 or higher, you may encounter errors during the installation process. To check your Python version
python3 --version
- Open your terminal or command prompt.
- first check the python
python --version
- Install CREW AI using pip
pip install crewai crewai-tools
-
If you encounter any errors during the installation process, Then You have to Install the crewai Tools here's the link below
- Now you will see this page:
-After installation , you have to open the downlaoded file and follow the instructions
-
MSVC v143 - VS 2022 C++ x64/x86Windows 10 SDK
-
You have to check this
-
Now you have to click on the install button
- Now you have to wait for the installation process to complete
pip install crewai crewai-tools
If you encounter errors because your global Python version is too high (e.g., Python 3.13), you can downgrade to Python 3.12.8 using pyenv.
-
Error Encountered: I encountered errors because my global Python version was too new (Python 3.13.1) for some dependencies in the project.
-
Solution: I used
pyenv
to downgrade my Python version to 3.12.8 as recommended by the Crew AI docs. -
I have the 3.13.1 python version installed on my system. I will install the required version of python using pyenv.
-
For MacOS/Linux
brew install pyenv
pyenv install 3.12.8
- Run this command in your project directory:
pyenv local 3.12.8
brew install pyenv-virtualenv
-
echo 'if which pyenv > /dev/null; then eval "$(pyenv init --path)"; eval "$(pyenv init -)"; eval "$(pyenv virtualenv-init -)"; fi' >> ~/.zshrc source ~/.zshrc
-
pyenv commands | grep virtualenv
-
pyenv virtualenv 3.12.8 crew_ai_env
First open the command prompt as administrator then run the following command:
-
Install Chocolatey
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
-
Install pyenv using Chocolatey:
choco install pyenv --pre
-
Install the required version of python using pyenv:
pyenv install <specified python version>
like this:
pyenv install 3.12.8
pyenv install 3.9.12
Download the version of python you want to install and then install it.
-
Verify the installation:
python --version
-
Refresh the terminal with this command to apply the changes:
pyenv rehash
- Click on the "Download" button.
- Select the "Build tools for C++" option.
- Choose the correct version of the build tools that matches your Python version.
- Click on the "Download" button to download the build tools.
-
For Windows:
pyenv install 3.12.8
- Run this command in your project directory:
pyenv local 3.12.8
- Run this command in your project directory:
-
NOwW:
-
pyenv local 3.12.8
This will set the local Python version to 3.12.8. in your project directory.
-
pyenv version # This should show Python 3.12.8
-
python -m venv myenv
This will create a virtual environment named myenv in your project directory.USing python 3.12.8
-
Install CrewAI: Install Crew AI with the recommended tools:
pip install crewai crewai-tools
-
Upgrade CrewAI (If Needed):
If you already have an older version, use:
pip install --upgrade crewai crewai-tools
-
Verify the Installation:
Run the following to check the installed versions:
pip freeze | grep crewai
You should see something like:
crewai==0.95.0 crewai-tools==0.25.8
-
Python Version Compatibility: Ensure you're using a compatible version of Python (3.10 to 3.12). If you face issues, downgrade to a supported version using pyenv.
-
Environment Issues: If you encounter problems related to the virtual environment, always ensure that you're activating the correct one. You can check your environment with:
pyenv version
- Missing Modules: If you get errors related to missing modules, verify that all dependencies are installed correctly with pip install.