mysqlclient 설치 에러

2023. 5. 1. 17:46·버그처리
728x90
SMALL

mysql 연동을 하는 도중에 mysqlclient 에러가 나왔다.

Collecting mysqlclient
  Using cached mysqlclient-2.1.1.tar.gz (88 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [16 lines of output]
      /bin/sh: mysql_config: command not found
      /bin/sh: mariadb_config: command not found
      /bin/sh: mysql_config: command not found
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/z4/j3lbnn6n7nq4c_p85j3k7_vc0000gn/T/pip-install-fg162xwb/mysqlclient_1eeda591a65f4f08a14b65bd141726c1/setup.py", line 15, in <module>
          metadata, options = get_config()
        File "/private/var/folders/z4/j3lbnn6n7nq4c_p85j3k7_vc0000gn/T/pip-install-fg162xwb/mysqlclient_1eeda591a65f4f08a14b65bd141726c1/setup_posix.py", line 70, in get_config
          libs = mysql_config("libs")
        File "/private/var/folders/z4/j3lbnn6n7nq4c_p85j3k7_vc0000gn/T/pip-install-fg162xwb/mysqlclient_1eeda591a65f4f08a14b65bd141726c1/setup_posix.py", line 31, in mysql_config
          raise OSError("{} not found".format(_mysql_config_path))
      OSError: mysql_config not found
      mysql_config --version
      mariadb_config --version
      mysql_config --libs
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

 

에러 해결 방법

1) brew로 mysql을 install 해준다.

brew install mysql

 

2) 그리고 다시 재설치

pip install mysqlclient

 

728x90
SMALL
저작자표시 비영리 변경금지 (새창열림)

'버그처리' 카테고리의 다른 글

EC2: Superset 백그라운드 실행 간 환경 변수 에러  (0) 2023.05.08
EC2: 특정 python버전으로 venv 생성시 에러 날 때(Mac 기준)  (0) 2023.05.05
superset db upgrade시 WARNING 문제(SECRET_KEY)  (0) 2023.05.01
AttributeError: 'sqlparse'  (0) 2023.05.01
RuntimeError: 'cryptography' 에러  (0) 2023.04.30
'버그처리' 카테고리의 다른 글
  • EC2: Superset 백그라운드 실행 간 환경 변수 에러
  • EC2: 특정 python버전으로 venv 생성시 에러 날 때(Mac 기준)
  • superset db upgrade시 WARNING 문제(SECRET_KEY)
  • AttributeError: 'sqlparse'
동석해요
동석해요
공부하고 싶은게 많은, 사소한 IT 지식들 공유
    250x250
  • 동석해요
    개발로 자기계발
    동석해요
  • 전체
    오늘
    어제
    • 분류 전체보기 (226)
      • Develop (126)
        • 기초지식 (12)
        • FastAPI (102)
        • Django (11)
      • Database & Data (62)
        • 기초지식 (16)
        • MySQL (29)
        • PostgreSQL (8)
        • 데이터 분석 (9)
      • 인공지능 (11)
        • PyTorch (9)
      • Cloud (8)
        • AWS (4)
        • GCP (2)
      • 버그처리 (14)
      • 회고 & 일상 (5)
  • 인기 글

  • 최근 글

  • 최근 댓글

  • hELLO· Designed By정상우.v4.10.3
동석해요
mysqlclient 설치 에러
상단으로

티스토리툴바