웹 개발/백엔드
[Django] Ubuntu 18.04 에서 mysqlclient 설치오류 해결방법
초보군붕이
2021. 7. 18. 17:12
반응형
Django 에서 DB로 Mysql을 사용하려면 mysqlclient 가 필요하다.
pip install mysqlclient
하지만 위 명령어를 입력하고나면 쉘에서 OSError 와 함께 에러가 발생한다.
이때 에러를 해결하려면 아래 패키지를 설치해주면 된다.
# Debian, Ubuntu 계열
sudo apt-get install python3-dev default-libmysqlclient-dev build-essential
# Redhat, CentOS 계열
sudo yum install python3-devel mysql-devel
그리고 나서 pip install mysqlclient 를 실행하면 정상적으로 설치가 진행된다.
Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output while installing mysqlcl
I am trying to install mysqlclient for python, but I always get this error when I try: $ pip3 install mysqlclient How can I resolve this issue?
stackoverflow.com
반응형