Skip to content

KhurramDevOps/crew_ai

Repository files navigation

Learning CREW AI

crew-only-logo.png

Overview

  • 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.

Installation

Prerequisites:

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

Install CREW AI IF YOU HAVE Python 3.10 or higher but less than 3.13

FOR WINDOWS

  • 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:

    c++ credentials.png

    -After installation , you have to open the downlaoded file and follow the instructions

  • You have to tick the check box

  • MSVC v143 - VS 2022 C++ x64/x86Windows 10 SDK

  • You have to check this

  • Now you will see this page: crewai check box

  • Now you have to click on the install button

now u see this page

downloading screen.png

  • Now you have to wait for the installation process to complete

Now try again to install CREWAI

pip install crewai crewai-tools

Hope so it will downloaded

Downgrading Python Version (If Needed)

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.

FACED Alot of ERROR ON Downgrading Python Version

  • 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.

  • SOLUTION FOR MacOS/LINUX:

  1. First, install pyenv using the following command:

  • For MacOS/Linux

    brew install pyenv
    
  1. Now Install Python Version 3.12.8 using pyenv:.

  pyenv install 3.12.8
  • Run this command in your project directory:
    pyenv local 3.12.8
  1. Now Install pyenv-vitualenv

brew install pyenv-virtualenv
  1. set up Shell Configuration

    echo 'if which pyenv > /dev/null; then eval "$(pyenv init --path)"; eval "$(pyenv init -)"; eval "$(pyenv virtualenv-init -)"; fi' >> ~/.zshrc
    source ~/.zshrc
  2. Verify the Plugin Installation

    pyenv commands | grep virtualenv
    
  3. Create the Virtual Environment

    pyenv virtualenv 3.12.8 crew_ai_env

SOLUTION For Windows if You have python 3.13 or later:

First open the command prompt as administrator then run the following command:

  1. 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'))
    
  2. Install pyenv using Chocolatey:

    choco install pyenv --pre
    
  3. 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.

  1. Verify the installation:

    python --version
  2. Refresh the terminal with this command to apply the changes:

pyenv rehash
  1. Then install the c++ credentials using this link :

    • Now you will see this page:

    c++ credentials

6. Install the C++ build tools:

 - 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.
  1. You have to tick the check box

    • MSVC v143 - VS 2022 C++ x64/x86Windows 10 SDK

    • You have to check this

    • Now you will see this page: crewai check box

    • Click the check box to tick it.

  2. Now Install Python Version 3.12.8 using pyenv:.

  • For Windows:

    pyenv install 3.12.8
    • Run this command in your project directory:
      pyenv local 3.12.8
  1. NOwW:

  2. Navigate to the project directory

  3. Run the following command in the command prompt:

    pyenv local 3.12.8

    This will set the local Python version to 3.12.8. in your project directory.

  4. verify

    pyenv version # This should show Python 3.12.8
  5. Create the virtual environment

    python -m venv myenv

    This will create a virtual environment named myenv in your project directory.USing python 3.12.8

Installing Crew AI

  1. Install CrewAI: Install Crew AI with the recommended tools:

    pip install crewai crewai-tools
    
    
  2. Upgrade CrewAI (If Needed):

    If you already have an older version, use:

    pip install --upgrade crewai crewai-tools
    
    
  3. 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

Troubleshooting Tips

  1. 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.

  2. 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
  1. Missing Modules: If you get errors related to missing modules, verify that all dependencies are installed correctly with pip install.

References:

Installation successful! You’re ready to create your first crew.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published