Brook Milligan <brook%nmsu.edu@localhost> writes: > I am trying to use sqlite3 from within python. It turns out that the > system-supplied version of sqlite3 is too old to support certain > features, so I installed both the pkgsrc version of sqlite3 and the > py-sqlite3 package. My path also includes /usr/pkg/bin prior to > /usr/bin so the pkgsrc version is picked up when sqlite3 is run from > the command line. However, python loads the system-supplied version > instead. > > How can python be made to load the pkgsrc version of sqlite3 in preference to the system-supplied version? It would help to give more details. Probably the issue is -L/-R for /usr/pkg not being ahead of the /usr ones in some link line. Probably it should be /usr/pkg first to prefer the pkgsrc stuff that it found. However that kind of change probably has unintended consequences so we should be careful. $ ldd /usr/pkg/lib/python2.7/lib-dynload/_sqlite3.so /usr/pkg/lib/python2.7/lib-dynload/_sqlite3.so: -lsqlite3.1 => /usr/lib/libsqlite3.so.1 -lgcc_s.1 => /usr/lib/libgcc_s.so.1 -lc.12 => /usr/lib/libc.so.12 -lpython2.7.1.0 => /usr/pkg/lib/libpython2.7.so.1.0 -lutil.7 => /usr/lib/libutil.so.7 -lm.0 => /usr/lib/libm.so.0 -lpthread.1 => /usr/lib/libpthread.so.1 This is perhaps not broken, because py-sqlite3 does not depend on the sqlite3 package. Perhaps you need PREFER_PKGSRC for that.
Attachment:
pgpqQsW4SWEac.pgp
Description: PGP signature