[Error] Error: pg_config executable not found

less than 1 minute read


ERROR Error: pg_config executable not found

  • 상황1
    • Docker Jupyter에서 psycopg2 라이브러리 설치시 에러 발생
  • 해결
    • 필요 라이브러리들 설치
  • 상황2
    • Mac M1 pyenv virtualenv에서 psycopg2 라이브러리 설치시 에러 발생
  • 해결
    • postgres 설치

Solution

  • 상황1
apt-get update -y
apt-get install -y \
#gcc \
python-dev \
libpq-dev

# 이후 필요한 라이브러리 설치
pip3 install psycopg2 \
pandas \
sqlalchemy \
ipython-sql
  • 상황2
brew install postgres