문제상황: pip으로 ubuntu machine에 mysqlclient를 설치하는데 오류가 났다.
$ pip install mysqlclient
Collecting mysqlclient==2.1.1 (from -r requirements.txt (line 32))
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: 1: mysql_config: not found
/bin/sh: 1: mariadb_config: not found
/bin/sh: 1: mysql_config: not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "[PATH]/setup.py", line 15, in <module>
metadata, options = get_config()
File "[PATH]/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "[PATH]/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.
해결 방안: conda로 설치하면 된다.
$ conda install mysqlclient
반응형
'CS > 삽질로그' 카테고리의 다른 글
TypeError: Object of type float32 is not JSON serializable (0) | 2023.07.12 |
---|---|
표준 출력, 표준 에러 파일에 쓰기 (리다이렉션) (0) | 2023.07.10 |
Git organization PUSH 에러 - The requested URL returned error: 403 (2) | 2023.06.05 |
ChatGPT Jupyter magic command error (incorrect api key 오류) (0) | 2023.05.08 |
[Git] git push size limit 오류 해결하기 (해결 완료, rebase, git-lfs) (0) | 2023.05.04 |