Symptôme: Dans mon application Django, quand je l'appelle from pysqlite2._sqlite import *
je reçois le retraçage Symbol not found: _sqlite3_enable_load_extension
quandSymbole introuvable: _sqlite3_enable_load_extension - sqlite installé via homebrew
Contexte:
- J'ai installé python à l'aide homebrew (python 2.7.13), qui auto installé SQLite
- Je courais macOS 10.12.3 avec des outils de ligne de commande macOS 10.12, Xcode 8.2.1
- J'ai installé pysqlite à l'aide pip (pysqlite 2.8.3)
J'ai essayé
brew uninstall sqlite
etbrew uninstall python
et réinstallantles ajouter à mon .bash_profile
export PATH="$(brew --prefix sqlite)/bin:$PATH" LDFLAGS="-L/usr/local/opt/sqlite/lib" CPPFLAGS="-I/usr/local/opt/sqlite/include" export PKG_CONFIG_PATH=“/usr/local/opt/sqlite/lib/pkgconfig”
python -c "sqlite3 import" ne renvoie pas d'erreur
Contenu essentiel de retraçage: https://gist.github.com/xwchen/e9704fa34f0463d2117fe9fbb37922a1