macOS & homebrew: v2.2.4 doesn't load with mysql-client 8.3.0 #703
-
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
pkgconfig EnvironmentPython: 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 |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Purging the cache worked: pip uninstall mysqlclient
pip cache purge
pip install mysqlclient |
Beta Was this translation helpful? Give feedback.
-
The file name is chosen when build. |
Beta Was this translation helpful? Give feedback.
Purging the cache worked: