crewAI icon indicating copy to clipboard operation
crewAI copied to clipboard

[BUG] "pg_config executable not found" when crew installing on macOS 13

Open mpepito13 opened this issue 1 year ago • 1 comments

Description

Hello, I have the following error when installing crewai on macOS 13.6.1 :

Error: pg_config executable not found.

What is to be done ?

Steps to Reproduce

  1. Create your project repository or download it from the crewai studio
  2. Install uv and crewai
  3. Launch the command crewai install

Expected behavior

Any dependencies should be installed and configured the right way when using the command crewai install

Screenshots/Code snippets

none

Operating System

macOS Ventura

Python Version

3.12

crewAI Version

v0.102.0

crewAI Tools Version

v0.36.0

Virtual Environment

Venv

Evidence

Using CPython 3.12.9 interpreter at: /Library/Frameworks/Python.framework/Versions/3.12/bin/python3 Creating virtual environment at: .venv Resolved 220 packages in 163ms Built polar-ble-sdk-macos-porting-agents @ file:///Users/arnaud/Documents/crewAI/polar_ble_sdk_macos_porting_agents × Failed to build psycopg2-binary==2.9.10├─▶ The build backend returned an error ╰─▶ Call tosetuptools.build_meta:legacy.build_wheel` failed (exit status: 1)

  [stdout]
  running egg_info
  writing psycopg2_binary.egg-info/PKG-INFO
  writing dependency_links to psycopg2_binary.egg-info/dependency_links.txt
  writing top-level names to psycopg2_binary.egg-info/top_level.txt

  [stderr]

  Error: pg_config executable not found.

  pg_config is required to build psycopg2 from source.  Please add the directory
  containing pg_config to the $PATH or specify the full executable path with the
  option:

      python setup.py build_ext --pg-config /path/to/pg_config build ...

  or with the pg_config option in 'setup.cfg'.

  If you prefer to avoid building psycopg2 from source, please install the PyPI
  'psycopg2-binary' package instead.

  For further information please check the 'doc/src/install.rst' file (also at
  <https://www.psycopg.org/docs/install.html>).


  hint: This usually indicates a problem with the package or the build environment.

help: psycopg2-binary (v2.9.10) was included because polar-ble-sdk-macos-porting-agents (v0.1.0) depends on crewai[tools] (v0.102.0) which depends on crewai-tools (v0.36.0) which depends on embedchain (v0.1.127) which depends on mem0ai (v0.1.65) which depends on psycopg2-binary An error occurred while running the crew: Command '['uv', 'sync']' returned non-zero exit status 1. `

Possible Solution

none

Additional context

none

mpepito13 avatar Mar 06 '25 11:03 mpepito13

I had to install postgresql thanks to the command brew install postgresql You can close the ticket but I guess this should be automated somehow.

mpepito13 avatar Mar 06 '25 12:03 mpepito13