Q&A
pip install mysqlclient をすると以下エラーが表示されてしまい、インストールができません
どのようにすればよいでしょうか?
Python 3.10.3
Collecting mysqlclient Using cached mysqlclient-2.1.0.tar.gz (87 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/yl/9cwnpgs11dz2pzdnk6s7kflr0000gn/T/pip-install-9zasodeo/mysqlclient_b5c42662453e43c2a9422de5aafa01c6/setup.py", line 15, in <module> metadata, options = get_config() File "/private/var/folders/yl/9cwnpgs11dz2pzdnk6s7kflr0000gn/T/pip-install-9zasodeo/mysqlclient_b5c42662453e43c2a9422de5aafa01c6/setup_posix.py", line 70, in get_config libs = mysql_config("libs") File "/private/var/folders/yl/9cwnpgs11dz2pzdnk6s7kflr0000gn/T/pip-install-9zasodeo/mysqlclient_b5c42662453e43c2a9422de5aafa01c6/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.
こちらの質問が複数のユーザーから「調査したこと・試したことが記載されていない質問」という指摘を受けました。
回答3件
あなたの回答
tips
プレビュー
下記のような回答は推奨されていません。
このような回答には修正を依頼しましょう。