macOS & homebrew: v2.2.4 doesn't load with mysql-client 8.3.0 #703
Answered
by
mschoettle
mschoettle
asked this question in
Issue report
Describe the bugWith Traceback (most recent call last):
File "/path/to/.venv/lib/python3.11/site-packages/django/db/backends/mysql/base.py", line 15, in <module>
import MySQLdb as Database
File "/path/to/.venv/lib/python3.11/site-packages/MySQLdb/__init__.py", line 17, in <module>
from . import _mysql
ImportError: dlopen(/path/to/.venv/lib/python3.11/site-packages/MySQLdb/_mysql.cpython-311-darwin.so, 0x0002): Library not loaded: /opt/homebrew/opt/mysql-client/lib/libmysqlclient.22.dylib
Referenced from: <DF046740-D2B4-3CB3-AE32-4615AA63CF10> /path/to/.venv/lib/python3.11/site-packages/MySQLdb/_mysql.cpython-311-darwin.so
Reason: tried: '/opt/homebrew/opt/mysql-client/lib/libmysqlclient.22.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/opt/mysql-client/lib/libmysqlclient.22.dylib' (no such file), '/opt/homebrew/opt/mysql-client/lib/libmysqlclient.22.dylib' (no such file), '/usr/local/lib/libmysqlclient.22.dylib' (no such file), '/usr/lib/libmysqlclient.22.dylib' (no such file, not in dyld cache), '/opt/homebrew/Cellar/mysql-client/8.3.0/lib/libmysqlclient.22.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/opt/homebrew/Cellar/mysql-client/8.3.0/lib/libmysqlclient.22.dylib' (no such file), '/opt/homebrew/Cellar/mysql-client/8.3.0/lib/libmysqlclient.22.dylib' (no such file), '/usr/local/lib/libmysqlclient.22.dylib' (no such file), '/usr/lib/libmysqlclient.22.dylib' (no such file, not in dyld cache)Listing $ ls /opt/homebrew/opt/mysql-client/lib/
.
..
libmysqlclient.23.dylib
libmysqlclient.a
libmysqlclient.dylib -> libmysqlclient.23.dylib
pkgconfigEnvironmentPython: 3.11.7 How did you install libmysqlclient libraries?brew install mysql-client What version of mysqlclient do you use?8.3.0 Docker command to start MySQL serverNo response Minimum but complete code to reproduceNo response Schema and initial data required to reproduce.No response Commands, and any other step required to reproduce your issue.No response |
Answered by
mschoettle
Feb 15, 2024
Replies: 2 comments
|
Purging the cache worked: pip uninstall mysqlclient
pip cache purge
pip install mysqlclient |
0 replies
Answer selected by
mschoettle
|
The file name is chosen when build. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Purging the cache worked: