I just purchased a new Macbook Pro with the M1 chip after ensuring that homebrew would work natively on it. I'm able to pip install any other library except mysqlclient, and I have no issue installing it via homebrew, so I'm wondering from the error message below, is this an issue with the mysqlclient not being updated for the latest version of Big Sur, or is this an issue with the new Macs itself? Just knowing that would be a great start for me, and if you had a suggestion on how to fix it, that'd be even better! Thank you!
ERROR: Command errored out with exit status 1:
command: /Users/danieljonathanschaefer/Desktop/work/401GOVE/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ht/p0kw7_d11ns61kqmpmfcy6b40000gn/T/pip-install-bifqtsix/mysqlclient_6f9d0caea513420ea2052d60956aab6d/setup.py'"'"'; __file__='"'"'/private/var/folders/ht/p0kw7_d11ns61kqmpmfcy6b40000gn/T/pip-install-bifqtsix/mysqlclient_6f9d0caea513420ea2052d60956aab6d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ht/p0kw7_d11ns61kqmpmfcy6b40000gn/T/pip-record-ukcglom_/install-record.txt --single-version-externally-managed --compile --install-headers /Users/danieljonathanschaefer/Desktop/work/401GOVE/include/site/python3.9/mysqlclient
cwd: /private/var/folders/ht/p0kw7_d11ns61kqmpmfcy6b40000gn/T/pip-install-bifqtsix/mysqlclient_6f9d0caea513420ea2052d60956aab6d/
Complete output (43 lines):
mysql_config --version
['8.0.25']
mysql_config --libs
['-L/opt/homebrew/Cellar/mysql/8.0.25_1/lib', '-lmysqlclient', '-lz', '-lzstd', '-lssl', '-lcrypto', '-lresolv']
mysql_config --cflags
['-I/opt/homebrew/Cellar/mysql/8.0.25_1/include/mysql']
ext_options:
library_dirs: ['/opt/homebrew/Cellar/mysql/8.0.25_1/lib']
libraries: ['mysqlclient', 'zstd', 'resolv']
extra_compile_args: ['-std=c99']
extra_link_args: []
include_dirs: ['/opt/homebrew/Cellar/mysql/8.0.25_1/include/mysql']
extra_objects: []
define_macros: [('version_info', "(2,0,3,'final',0)"), ('__version__', '2.0.3')]
running install
running build
running build_py
creating build
creating build/lib.macosx-10.9-x86_64-3.9
creating build/lib.macosx-10.9-x86_64-3.9/MySQLdb
copying MySQLdb/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb
creating build/lib.macosx-10.9-x86_64-3.9/MySQLdb/constants
copying MySQLdb/constants/__init__.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-x86_64-3.9/MySQLdb/constants
running build_ext
building 'MySQLdb._mysql' extension
creating build/temp.macosx-10.9-x86_64-3.9
creating build/temp.macosx-10.9-x86_64-3.9/MySQLdb
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -arch x86_64 -g -I/opt/homebrew/opt/openssl@1.1/include -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/opt/homebrew/Cellar/mysql/8.0.25_1/include/mysql -I/Users/danieljonathanschaefer/Desktop/work/401GOVE/include -I/Library/Frameworks/Python.framework/Versions/3.9/include/python3.9 -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-x86_64-3.9/MySQLdb/_mysql.o -std=c99
gcc -bundle -undefined dynamic_lookup -arch x86_64 -g -L/opt/homebrew/opt/openssl@1.1/lib -I/opt/homebrew/opt/openssl@1.1/include build/temp.macosx-10.9-x86_64-3.9/MySQLdb/_mysql.o -L/opt/homebrew/Cellar/mysql/8.0.25_1/lib -lmysqlclient -lzstd -lresolv -o build/lib.macosx-10.9-x86_64-3.9/MySQLdb/_mysql.cpython-39-darwin.so
ld: library not found for -lzstd
clang: error: linker command failed with exit code 1 (use -v to see invocation)
error: command '/usr/bin/gcc' failed with exit code 1
----------------------------------------
ERROR: Command errored out with exit status 1: /Users/danieljonathanschaefer/Desktop/work/401GOVE/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ht/p0kw7_d11ns61kqmpmfcy6b40000gn/T/pip-install-bifqtsix/mysqlclient_6f9d0caea513420ea2052d60956aab6d/setup.py'"'"'; __file__='"'"'/private/var/folders/ht/p0kw7_d11ns61kqmpmfcy6b40000gn/T/pip-install-bifqtsix/mysqlclient_6f9d0caea513420ea2052d60956aab6d/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/ht/p0kw7_d11ns61kqmpmfcy6b40000gn/T/pip-record-ukcglom_/install-record.txt --single-version-externally-managed --compile --install-headers /Users/danieljonathanschaefer/Desktop/work/401GOVE/include/site/python3.9/mysqlclient Check the logs for full command output.