Skip to content

Latest commit

 

History

History
56 lines (34 loc) · 1.85 KB

developer_setup.md

File metadata and controls

56 lines (34 loc) · 1.85 KB

Manual

Virtual Environment (Recommended)

🚀 A better way to set up repositories

A virtual environment in Python is a self-contained directory that contains a Python installation for a particular version of Python, plus a number of additional packages. Using a virtual environment for your project ensures that the project's dependencies are isolated from the system-wide Python and other Python projects. This is especially useful when working on multiple projects with differing dependencies, as it prevents potential conflicts between packages and allows for easy management of requirements.

  1. To set up and use a virtual environment for CrawlAI: First, install the virtualenv package using pip. This tool helps create isolated Python environments.

    pip install virtualenv
  2. Create virtual environment Next, create a new virtual environment in the project directory. This environment is a directory containing a complete Python environment (interpreter and other necessary files).

    python -m venv venv
  3. Activate virtual environment To activate the environment, run the following command: * For windows: bash source ./venv/Scripts/activate

    * For Linux / MacOS:
        ```bash
        source venv/bin/activate
        ```
    

Install dependencies

With the virtual environment activated, install the project dependencies:

pip install -r requirements.txt

The requirements.txt file contains a list of packages necessary to run CrawlAI. Installing them in an activated virtual environment ensures they are available to the project without affecting other Python projects or system settings.

python -m venv venv source venv/bin/activate pip install -r "requirements.txt"