On Fri, Aug 20, 2010 at 15:39:31 +0800, Sutra Zhou wrote: > After I installed python27, import sqlite3 failed: > > r...@www:~%pkg_info -Ix py > ap22-mod_python-3.3.1_3 Apache module that embeds the Python > interpreter within the > clearsilver-python-0.10.5 A fast, powerful, and language-neutral template > system > py27-Genshi-0.6 Python toolkit for stream-based generation of output for > th > py27-docutils-0.7 Python Documentation Utilities > py27-pygments-1.3.1 A syntax highlighter written in Python > py27-pytz-2010k World Timezone Definitions for Python > py27-setuptools-0.6c11 Download, build, install, upgrade, and > uninstall Python pac > py27-sqlite3-2.7_1 Standard Python binding to the SQLite3 library > py27-subversion-1.6.12_1 Python bindings for version control system > py27-xlrd-0.7.1_1 Reading data and formatting information from Excel files > python27-2.7.0 An interpreted object-oriented programming language > r...@www:~%python > Python 2.7 (r27:82500, Aug 20 2010, 03:40:41) > [GCC 4.2.1 20070719 [FreeBSD]] on freebsd8 > Type "help", "copyright", "credits" or "license" for more information. > >>> import sqlite3 > Traceback (most recent call last): > File "<stdin>", line 1, in <module> > File "/usr/local/lib/python2.7/sqlite3/__init__.py", line 24, in <module> > from dbapi2 import * > File "/usr/local/lib/python2.7/sqlite3/dbapi2.py", line 27, in <module> > from _sqlite3 import * > ImportError: /usr/local/lib/python2.7/site-packages/_sqlite3.so: > Undefined symbol "sqlite3_load_extension" > > Would you please tell me how to diagnose this problem?
At this point the best way is rebuilding your databases/sqlite3 with EXTENSION option on, then rebuilding databases/py-sqlite3 . I've filed a PR for turn this option default on: http://www.freebsd.org/cgi/query-pr.cgi?pr=149842 Li-Wen -- Li-Wen Hsu <lwhsu AT FreeBSD.org> http://lwhsu.org
pgpPKbpvdy0LF.pgp
Description: PGP signature