Symptom: In my Django app, when I call from pysqlite2._sqlite import *
I get the traceback Symbol not found: _sqlite3_enable_load_extension
when
Background:
- I've installed python using homebrew (python 2.7.13), which auto installed sqlite
- I am running macOS 10.12.3 with Command Line Tools macOS 10.12, Xcode 8.2.1
- I've installed pysqlite using pip (pysqlite 2.8.3)
I have tried
brew uninstall sqlite
andbrew uninstall python
and reinstallingAdding these to my .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 "import sqlite3" doesn't return any errors
Gist of traceback: https://gist.github.com/xwchen/e9704fa34f0463d2117fe9fbb37922a1
Symbol not found: _sqlite3_enable_load_extension
error. I reinstalled python2, python3 and sqlite without any success and I cant find a google page anymore which helps me. I also added several environment variables. LikeLDFLAGS
,CPPFLAGS
,PKG_CONFIG_PATH
,DYLD_LIBRARY_PATH
I am using python 2.7 in <- virtual environment with Mac OS 10.15.6 please help. – Copperplate