Installing mysqlclient
with pip succeeds, but with pipenv it fails.
Install musqlclient
of latest version.
$ pipenv install mysqlclient
Installing mysqlclientβ¦
β Installation Succeeded
Installing dependencies from Pipfile.lock (e7ba11)β¦
An error occurred while installing mysqlclient==1.4.2.post1 --hash=sha256:425e733b05e359a714d6007c0fc44582be66b63e5a3df0a50949274ae16f4bc6 --hash=sha256:62e4770b6a797b9416bcf70488365b7d6b9c9066878108499c559293bb464380 --hash=sha256:f257d250f2675d0ef99bd318906f3cfc05cef4a2f385ea695ff32a3f04b9f9a7! Will try again.
π ββββββββββββββββββββββββββββββββ 5/5 β 00:00:02
Installing initially failed dependenciesβ¦
[pipenv.exceptions.InstallError]: File "/usr/local/var/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/core.py", line 1992, in do_install
[pipenv.exceptions.InstallError]: skip_lock=skip_lock,
[pipenv.exceptions.InstallError]: File "/usr/local/var/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/usr/local/var/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/core.py", line 859, in do_install_dependencies
[pipenv.exceptions.InstallError]: retry_list, procs, failed_deps_queue, requirements_dir, **install_kwargs
[pipenv.exceptions.InstallError]: File "/usr/local/var/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/core.py", line 763, in batch_install
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, not blocking, failed_deps_queue, retry=retry)
[pipenv.exceptions.InstallError]: File "/usr/local/var/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting mysqlclient==1.4.2.post1 (from -r /var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pipenv-67gcd6l9-requirements/pipenv-qg291cj4-requirement.txt (line 1))', ' Using cached https://files.pythonhosted.org/packages/f4/f1/3bb6f64ca7a429729413e6556b7ba5976df06019a5245a43d36032f1061e/mysqlclient-1.4.2.post1.tar.gz', 'Building wheels for collected packages: mysqlclient', ' Building wheel for mysqlclient (setup.py): started', " Building wheel for mysqlclient (setup.py): finished with status 'error'", ' Running setup.py clean for mysqlclient', 'Failed to build mysqlclient', 'Installing collected packages: mysqlclient', ' Running setup.py install for mysqlclient: started', " Running setup.py install for mysqlclient: finished with status 'error'"]
[pipenv.exceptions.InstallError]: ['ERROR: Command errored out with exit status 1:', ' command: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/python3.7 -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py\'"\'"\'; __file__=\'"\'"\'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py\'"\'"\';f=getattr(tokenize, \'"\'"\'open\'"\'"\', open)(__file__);code=f.read().replace(\'"\'"\'\\r\\n\'"\'"\', \'"\'"\'\\n\'"\'"\');f.close();exec(compile(code, __file__, \'"\'"\'exec\'"\'"\'))\' bdist_wheel -d /private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-wheel-85d24i4b --python-tag cp37', ' cwd: /private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/', ' Complete output (32 lines):', ' running bdist_wheel', ' running build', ' running build_py', ' creating build', ' creating build/lib.macosx-10.14-x86_64-3.7', ' creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/_exceptions.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/compat.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/connections.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/converters.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/cursors.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/release.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/times.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/CR.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/ER.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' warning: build_py: byte-compiling is disabled, skipping.', ' ', ' running build_ext', " building 'MySQLdb._mysql' extension", ' creating build/temp.macosx-10.14-x86_64-3.7', ' creating build/temp.macosx-10.14-x86_64-3.7/MySQLdb', " clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 -I/usr/local/Cellar/mysql/8.0.16/include/mysql -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o", ' clang -bundle -undefined dynamic_lookup build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.16/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so', ' ld: library not found for -lssl', ' clang: error: linker command failed with exit code 1 (use -v to see invocation)', " error: command 'clang' failed with exit status 1", ' ----------------------------------------', ' ERROR: Failed building wheel for mysqlclient', ' ERROR: Command errored out with exit status 1:', ' command: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/python3.7 -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py\'"\'"\'; __file__=\'"\'"\'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/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/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-record-1hops9ch/install-record.txt --single-version-externally-managed --compile --install-headers /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/../include/site/python3.7/mysqlclient', ' cwd: /private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/', ' Complete output (32 lines):', ' running install', ' running build', ' running build_py', ' creating build', ' creating build/lib.macosx-10.14-x86_64-3.7', ' creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/_exceptions.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/compat.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/connections.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/converters.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/cursors.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/release.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' copying MySQLdb/times.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb', ' creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/CR.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/ER.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants', ' warning: build_py: byte-compiling is disabled, skipping.', ' ', ' running build_ext', " building 'MySQLdb._mysql' extension", ' creating build/temp.macosx-10.14-x86_64-3.7', ' creating build/temp.macosx-10.14-x86_64-3.7/MySQLdb', " clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 -I/usr/local/Cellar/mysql/8.0.16/include/mysql -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o", ' clang -bundle -undefined dynamic_lookup build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.16/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so', ' ld: library not found for -lssl', ' clang: error: linker command failed with exit code 1 (use -v to see invocation)', " error: command 'clang' failed with exit status 1", ' ----------------------------------------', 'ERROR: Command errored out with exit status 1: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/python3.7 -u -c \'import sys, setuptools, tokenize; sys.argv[0] = \'"\'"\'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py\'"\'"\'; __file__=\'"\'"\'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/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/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-record-1hops9ch/install-record.txt --single-version-externally-managed --compile --install-headers /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/../include/site/python3.7/mysqlclient Check the logs for full command output.']
ERROR: ERROR: Package installation failed...
β€ ββββββββββββββββββββββββββββββββ 0/1 β 00:00:02
Pipfile
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
flake8 = "*"
autopep8 = "*"
[packages]
django = "*"
django-mysql = "*"
mysqlclient = "*"
[requires]
python_version = "3.7"
I don't know this information would be helpful, I installed mysql client using brew.
$ brew install mysql
$ pipenv --support
Pipenv version: '2018.11.26'
Pipenv location: '/usr/local/var/pyenv/versions/3.7.1/lib/python3.7/site-packages/pipenv'
Python location: '/usr/local/var/pyenv/versions/3.7.1/bin/python3.7'
Python installations found:
3.7.4
: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/python3
3.7.4
: /usr/local/bin/python3
3.7.4
: /usr/local/bin/python3.7m
3.7.1
: /usr/local/var/pyenv/versions/3.7.1/bin/python3
3.7.1
: /usr/local/var/pyenv/versions/3.7.1/bin/python3.7m
2.7.10
: /usr/bin/python
2.7.10
: /usr/bin/pythonw
2.7.10
: /usr/bin/python2.7
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.7.1',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '18.6.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT '
'2019; root:xnu-4903.261.4~2/RELEASE_X86_64',
'python_full_version': '3.7.1',
'python_version': '3.7',
'sys_platform': 'darwin'}
System environment variables:
PYENV_ROOT
TERM
SHELL
PIPENV_VENV_IN_PROJECT
TMPDIR
Apple_PubSub_Socket_Render
ZDOTDIR
PYENV_VERSION
ZSH
__INTELLIJ_COMMAND_HISTFILE__
NVM_DIR
PIPENV_IGNORE_VIRTUALENVS
USER
SSH_AUTH_SOCK
PYENV_DIR
__CF_USER_TEXT_ENCODING
LOGIN_SHELL
VIRTUAL_ENV
PAGER
LSCOLORS
PATH
TERMINAL_EMULATOR
PWD
PYENV_HOOK_PATH
XPC_FLAGS
XPC_SERVICE_NAME
PYENV_SHELL
SHLVL
HOME
LESS
LOGNAME
LC_CTYPE
PIP_DISABLE_PIP_VERSION_CHECK
PYTHONDONTWRITEBYTECODE
PIP_SHIMS_BASE_MODULE
PIP_PYTHON_PATH
PYTHONFINDER_IGNORE_UNSUPPORTED
Pipenvβspecific environment variables:
PIPENV_VENV_IN_PROJECT
: true
PIPENV_IGNORE_VIRTUALENVS
: 1
Debugβspecific environment variables:
PATH
: /usr/local/var/pyenv/versions/3.7.1/bin:/usr/local/Cellar/pyenv/1.2.13/libexec:/Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin:/usr/local/opt/openssl/bin:/usr/local/var/pyenv/shims:/Users/shinseunghoon/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/var/pyenv/versions/3.7.1/bin:/usr/local/Cellar/pyenv/1.2.13/libexec:/usr/local/var/pyenv/shims:/Users/shinseunghoon/bin
SHELL
: /bin/zsh
PWD
: /Users/shinseunghoon/repository/toy/sample-backoffice
VIRTUAL_ENV
: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv
Contents of Pipfile
('/Users/shinseunghoon/repository/toy/sample-backoffice/Pipfile'):
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[dev-packages]
flake8 = "*"
autopep8 = "*"
[packages]
django = "*"
django-mysql = "*"
mysqlclient = "*"
[requires]
python_version = "3.7"
Contents of Pipfile.lock
('/Users/shinseunghoon/repository/toy/sample-backoffice/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "f02c40ac7fef8f4b3f08d60657858362a14d0e68166c2579fc2c41d593e7ba11"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.org/simple",
"verify_ssl": true
}
]
},
"default": {
"django": {
"hashes": [
"sha256:4d23f61b26892bac785f07401bc38cbf8fa4cec993f400e9cd9ddf28fd51c0ea",
"sha256:6e974d4b57e3b29e4882b244d40171d6a75202ab8d2402b8e8adbd182e25cf0c"
],
"index": "pypi",
"version": "==2.2.3"
},
"django-mysql": {
"hashes": [
"sha256:5ed13e3c4e4dc1671255bfc5a9f943320079af626a0c4d1a7f8baf276f5b9de2",
"sha256:6a6d3b2b4b094418d67cc064b110d8ac31ca98a67b535568cf829bf052c718db"
],
"index": "pypi",
"version": "==3.2.0"
},
"mysqlclient": {
"hashes": [
"sha256:425e733b05e359a714d6007c0fc44582be66b63e5a3df0a50949274ae16f4bc6",
"sha256:62e4770b6a797b9416bcf70488365b7d6b9c9066878108499c559293bb464380",
"sha256:f257d250f2675d0ef99bd318906f3cfc05cef4a2f385ea695ff32a3f04b9f9a7"
],
"index": "pypi",
"version": "==1.4.2.post1"
},
"pytz": {
"hashes": [
"sha256:303879e36b721603cc54604edcac9d20401bdbe31e1e4fdee5b9f98d5d31dfda",
"sha256:d747dd3d23d77ef44c6a3526e274af6efeb0a6f1afd5a69ba4d5be4098c8e141"
],
"version": "==2019.1"
},
"sqlparse": {
"hashes": [
"sha256:40afe6b8d4b1117e7dff5504d7a8ce07d9a1b15aeeade8a2d10f130a834f8177",
"sha256:7c3dca29c022744e95b547e867cee89f4fce4373f3549ccd8797d8eb52cdb873"
],
"version": "==0.3.0"
}
},
"develop": {
"autopep8": {
"hashes": [
"sha256:4d8eec30cc81bc5617dbf1218201d770dc35629363547f17577c61683ccfb3ee"
],
"index": "pypi",
"version": "==1.4.4"
},
"entrypoints": {
"hashes": [
"sha256:589f874b313739ad35be6e0cd7efde2a4e9b6fea91edcc34e58ecbb8dbe56d19",
"sha256:c70dd71abe5a8c85e55e12c19bd91ccfeec11a6e99044204511f9ed547d48451"
],
"version": "==0.3"
},
"flake8": {
"hashes": [
"sha256:19241c1cbc971b9962473e4438a2ca19749a7dd002dd1a946eaba171b4114548",
"sha256:8e9dfa3cecb2400b3738a42c54c3043e821682b9c840b0448c0503f781130696"
],
"index": "pypi",
"version": "==3.7.8"
},
"mccabe": {
"hashes": [
"sha256:ab8a6258860da4b6677da4bd2fe5dc2c659cff31b3ee4f7f5d64e79735b80d42",
"sha256:dd8d182285a0fe56bace7f45b5e7d1a6ebcbf524e8f3bd87eb0f125271b8831f"
],
"version": "==0.6.1"
},
"pycodestyle": {
"hashes": [
"sha256:95a2219d12372f05704562a14ec30bc76b05a5b297b21a5dfe3f6fac3491ae56",
"sha256:e40a936c9a450ad81df37f549d676d127b1b66000a6c500caa2b085bc0ca976c"
],
"version": "==2.5.0"
},
"pyflakes": {
"hashes": [
"sha256:17dbeb2e3f4d772725c777fabc446d5634d1038f234e77343108ce445ea69ce0",
"sha256:d976835886f8c5b31d47970ed689944a0262b5f3afa00a5a7b4dc81e5449f8a2"
],
"version": "==2.1.1"
}
}
}
The full output is following if you cannot see it clearly, it is blaming that lib ssl can't be found. You probably need to specify the openssl library path.
ERROR: Command errored out with exit status 1:
command: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-wheel-85d24i4b --python-tag cp37
cwd: /private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/
Complete output (32 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/MySQLdb
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 -I/usr/local/Cellar/mysql/8.0.16/include/mysql -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.16/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for mysqlclient
ERROR: Command errored out with exit status 1:
command: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/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/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-record-1hops9ch/install-record.txt --single-version-externally-managed --compile --install-headers /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/../include/site/python3.7/mysqlclient
cwd: /private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/
Complete output (32 lines):
running install
running build
running build_py
creating build
creating build/lib.macosx-10.14-x86_64-3.7
creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/compat.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb
creating build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.14-x86_64-3.7/MySQLdb/constants
warning: build_py: byte-compiling is disabled, skipping.
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.macosx-10.14-x86_64-3.7
creating build/temp.macosx-10.14-x86_64-3.7/MySQLdb
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -Dversion_info=(1,4,2,'post',1) -D__version__=1.4.2.post1 -I/usr/local/Cellar/mysql/8.0.16/include/mysql -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o
clang -bundle -undefined dynamic_lookup build/temp.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.o -L/usr/local/Cellar/mysql/8.0.16/lib -lmysqlclient -lssl -lcrypto -o build/lib.macosx-10.14-x86_64-3.7/MySQLdb/_mysql.cpython-37m-darwin.so
ld: library not found for -lssl
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/mysqlclient/setup.py'"'"'; __file__='"'"'/private/var/folders/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-install-5jqjaych/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/3l/x67d1f3x2475tj3yyvy47jqh0000gn/T/pip-record-1hops9ch/install-record.txt --single-version-externally-managed --compile --install-headers /Users/shinseunghoon/repository/toy/sample-backoffice/.venv/bin/../include/site/python3.7/mysqlclient Check the logs for full command output
I get same error, I already have installed openssl
, how can I specify the path?
@ricocrescenzio95
export LDFLAGS="-L/usr/local/opt/openssl/lib $LDFLAGS"
export CPPFLAGS="-I/usr/local/opt/openssl/include $CPPFLAGS"
Thank you @frostming!! You're a lifesaver π
If using Python3, install
sudo apt-get install python3-dev
go to this site to download the package according to the python version. and use pip install filename
like i have python 3.7.1 and download the file in red circle and open terminal where file downloaded and install that file e.g pip install mysqlclient-1.4.4-cp37-cp37m-win32.whl
and in setting file
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'shoping_cart',
'HOST': 'localhost',
'USER': 'root',
'PASSWORD':'',
'PORT': '3306',
}
}
Unable to solve this problem on Mac 10.14. PLease help
@nidhiatwork If you need help, please provide some information about the case. this problem isn't enough to tell whether your case is the same or not.
@frostming I spent half an hour on this and was finally able to solve by reinstalling xcode command line tools and then using pip install mysqlclient
@nidhiatwork doing this didn't even work for me :( I spent more than an hour on this issue..
@saikiran-sjsu perhaps you can provide the error you are getting so we can help you?
#error architecture not supported
This is probably your issue - and has nothing to do with pipenv. Please raise it with the library you are trying to install
not sure I understand. please explain?
unable to solve this issue in ubuntu 20.04 with python 3.7 please help
Most helpful comment
@ricocrescenzio95