前提・実現したいこと
初めまして。
pip3にmysqlclientとdjango-herokuをインストールしたいのですがエラーが出ています。
半月近く、計25時間ほど調べてもわからなかったので皆様のお力をお借りしたいです。
また、HerokuにデプロイしたDjangoアプリケーションをMySQLに繋ぎたく奮闘しているので、代替法があればご教授願います。
発生している問題・エラーメッセージ
Collecting mysqlclient Using cached https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz Installing collected packages: mysqlclient Running setup.py install for mysqlclient ... error ERROR: Command errored out with exit status 1: command: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mt/h5hm2_mj2r33d_ydxht5zklw0000gn/T/pip-install-rj1zx28e/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/mt/h5hm2_mj2r33d_ydxht5zklw0000gn/T/pip-install-rj1zx28e/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/mt/h5hm2_mj2r33d_ydxht5zklw0000gn/T/pip-record-zne0xgde/install-record.txt --single-version-externally-managed --compile cwd: /private/var/folders/mt/h5hm2_mj2r33d_ydxht5zklw0000gn/T/pip-install-rj1zx28e/mysqlclient/ Complete output (30 lines): running install running build running build_py creating build creating build/lib.macosx-10.9-x86_64-3.8 creating build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/compat.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb creating build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.8/MySQLdb/constants running build_ext building 'MySQLdb._mysql' extension creating build/temp.macosx-10.9-x86_64-3.8 creating build/temp.macosx-10.9-x86_64-3.8/MySQLdb gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -Dversion_info=(1,4,6,'final',0) -D__version__=1.4.6 -I/usr/local/Cellar/mysql/8.0.18_1/include/mysql -I/Library/Frameworks/Python.framework/Versions/3.8/include/python3.8 -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.8/MySQLdb/_mysql.o gcc -bundle -undefined dynamic_lookup -arch x86_64 -g build/temp.macosx-10.9-x86_64-3.8/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.18_1/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.9-x86_64-3.8/MySQLdb/_mysql.cpython-38-darwin.so ld: library not found for -lssl clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command 'gcc' failed with exit status 1 ---------------------------------------- ERROR: Command errored out with exit status 1: /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/mt/h5hm2_mj2r33d_ydxht5zklw0000gn/T/pip-install-rj1zx28e/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/mt/h5hm2_mj2r33d_ydxht5zklw0000gn/T/pip-install-rj1zx28e/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/mt/h5hm2_mj2r33d_ydxht5zklw0000gn/T/pip-record-zne0xgde/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
該当のソースコード
Python
1pip3 install mysqlclient
試したこと
・stackoverflowでの検索
・様々なコマンド
試したことというより、根本的な原因の解決法が見つからなくて困っています。
理由はdjango-herokuをインストールしようとした時も似たようなエラーが出るからです。
補足情報(FW/ツールのバージョンなど)
MacOS Catalina 10.15.2
Python 3.8.1
Django 3.0.2
mysql Ver 8.0.18 for osx10.15 on x86_64 (Homebrew)
MySQL workbench 8.0.18
以下、pip3に入っている全てのパッケージです。
(依存関係が原因かも?と思ったので記載)
asgiref==3.2.3
astroid==2.3.3
beautifulsoup4==4.8.1
bleach==3.1.0
certifi==2019.11.28
chardet==3.0.4
Click==7.0
defusedxml==0.6.0
dj-database-url==0.5.0
dj-static==0.0.6
Django==3.0.2
django-allauth==0.41.0
django-bootstrap==0.2.4
django-bootstrap4==1.1.1
django-cleanup==4.0.0
django-crispy-forms==1.8.1
gunicorn==20.0.4
html5lib==1.0.1
idna==2.8
isort==4.3.21
jsonconfig-tool==1.5
keyring==20.0.0
lazy-object-proxy==1.4.3
Markdown==3.1.1
mccabe==0.6.1
messages==0.5.0
oauthlib==3.1.0
Pillow==6.2.1
pipenv==2018.11.26
psycopg2-binary==2.8.4
pylint==2.4.3
PyMySQL==0.9.3
python-box==3.4.6
python-decouple==3.3
python3-openid==3.1.0
pytz==2019.3
requests==2.22.0
requests-oauthlib==1.3.0
six==1.13.0
soupsieve==1.9.5
sqlparse==0.3.0
static3==0.7.0
stripe==2.41.1
Unipath==1.1
urllib3==1.25.7
validus==0.3.0
virtualenv==16.7.9
virtualenv-clone==0.5.3
webencodings==0.5.1
whitenoise==5.0.1
wrapt==1.11.2
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。