##環境
Python 3.7.4
MacOS 10.14.6
###エラー
ERROR: Command errored out with exit status 1: command: /Users/$$/.pyenv/versions/3.7.4/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/b3/r4jtldhx325128m33y47fj000000gn/T/pip-install-9rfsr641/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/b3/r4jtldhx325128m33y47fj000000gn/T/pip-install-9rfsr641/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info cwd: /private/var/folders/b3/r4jtldhx325128m33y47fj000000gn/T/pip-install-9rfsr641/mysqlclient/ Complete output (20 lines): pyenv: mysql_config: command not found The `mysql_config' command exists in these Python versions: anaconda3-5.3.1 /bin/sh: mariadb_config: command not found pyenv: mysql_config: command not found The `mysql_config' command exists in these Python versions: anaconda3-5.3.1 Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/b3/r4jtldhx325128m33y47fj000000gn/T/pip-install-9rfsr641/mysqlclient/setup.py", line 16, in <module> metadata, options = get_config() File "/private/var/folders/b3/r4jtldhx325128m33y47fj000000gn/T/pip-install-9rfsr641/mysqlclient/setup_posix.py", line 61, in get_config libs = mysql_config("libs") File "/private/var/folders/b3/r4jtldhx325128m33y47fj000000gn/T/pip-install-9rfsr641/mysqlclient/setup_posix.py", line 29, in mysql_config raise EnvironmentError("%s not found" % (_mysql_config_path,)) OSError: mysql_config not found ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
###試みた事1
bash_profileのanaconda3に関する記述をコメントアウトした
# Setting PATH for Python 3.6 # The original version is saved in .bash_profile.pysave #PATH="/Library/Frameworks/Python.framework/Versions/3.6/bin:${PATH}" export PYENV_ROOT="$HOME/.pyenv" export PATH="$PYENV_ROOT/bin:$PATH" export PATH="$HOME/.pyenv/shims:$PATH" eval "$(pyenv init -)" source ~/.bashrc # Setting PATH for Python 3.7 # The original version is saved in .bash_profile.pysave PATH="/Library/Frameworks/Python.framework/Versions/3.7/bin:${PATH}" export PATH # added by Anaconda3 2019.03 installer # >>> conda init >>> # !! Contents within this block are managed by 'conda init' !! #__conda_setup="$(CONDA_REPORT_ERRORS=false '/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" #if [ $? -eq 0 ]; then # \eval "$__conda_setup" #else # if [ -f "/anaconda3/etc/profile.d/conda.sh" ]; then # . "/anaconda3/etc/profile.d/conda.sh" # CONDA_CHANGEPS1=false conda activate base # else # \export PATH="/anaconda3/bin:$PATH" # fi #fi #unset __conda_setup # <<< conda init <<< ~
同じエラーが引き続く
###試みた事2
以下を実行
brew install mysql-connector-c
同じエラーが引き続く
解決に至る知見のある方、ご教授お願いします。
最初のエラーメッセージが出たときに入力したコマンドを教えてください。
Anaconda使っているなら
$ conda install -c https://conda.anaconda.org/anaconda mysql-connector-python
で入るようです(私はAnaconda使っていないので)。
Anacondaとpipとごちゃ混ぜに使っていませんか?
コメントありがとうございます。
最初に実行したコマンドは"pip install mysqlclient"です。
おっしゃるとうりです。
pip, anaconda 両方ともインストールしています。
現状では解決策が見当たらないので、anacondaをアインストールする事を考えています。
あなたの回答
tips
プレビュー