areum

[Python] psycopg2 설치하는 방법 본문

Programming/Python

[Python] psycopg2 설치하는 방법

armmy 2023. 1. 11. 16:19
728x90

pip install을 통해 psycopg2를 설치하는데 계속 오류가 발생한다.

오류 : command errores out with exit status 1

 

해결방법


- 현재 psycopg2 권장사항 : python 버전  3.6 ~ 3.11

방법1. 버전 확인 ( python, postgresql)

python버전 확인
python --version
 
위 권장사항의 버전과 맞지 않는다면 업그레이드 또는 다운그레이드 진행
python -m pip install --upgrade pip

 

방법2. psycopg2-binary 설치

pip install psycopg2-binary