Date: Wed, 15 Jun 2016 14:13:08 +0200 From: Eir Nym <eirnym@gmail.com> To: Nan Xiao <nan@chinadtrace.org> Cc: freebsd-questions <freebsd-questions@freebsd.org> Subject: Re: How to use sqlite3 in python on FreeBSD 10.3? Message-ID: <E51BAEAE-7296-4368-9505-638DC4420809@gmail.com> In-Reply-To: <2016061518322497404919@chinadtrace.org> References: <2016061518322497404919@chinadtrace.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi, Nan, > On 15 Jun 2016, at 12:32, Nan Xiao <nan@chinadtrace.org> wrote: >=20 > Hi all, >=20 > Greetings from me! I am a newbie of FreeBSD, and want to use sqlite3 = in python on my FreeBSD 10.3. After installing python, it prompts I = should install the following additional packages: >=20 > ...... > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > Note that some standard Python modules are provided as separate ports > as they require additional dependencies. They are available as: > bsddb databases/py-bsddb > gdbm databases/py-gdbm > sqlite3 databases/py-sqlite3 > tkinter x11-toolkits/py-tkinter > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= > =46rom this post, it seems after installing above 4 packages, the = sqlite3 should be able to work. But "impore sqlite3" still reports = following errors: >=20 >>>> 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 28, in = <module> > from _sqlite3 import * > ImportError: No module named _sqlite3 >=20 > Could anyone help on this issue? Thanks very much in advance! >=20 You should install databases/py-sqlite3 port for your system. This port = as any other python library depends on python versions installed. You = can read about specifying python version to build this library for in = Handbook. > Have a nice day! >=20 > P.S., I also submit this issue on SO, but unfortunately, I can't get = any help from there, so I repost the question here, thanks!=20 >=20 >=20 >=20 > Best Regards > Nan Xiao (=E8=82=96=E6=A5=A0) > Skype: xiaonan19830818 > Jabber/XMPP: nanxiao@xmpp.ru.net=20 > Telegram: nanxiao > Personal website (Chinese): http://nanxiao.me/=20 > Personal website (English): http://nanxiao.me/en=20 > Chinese DTrace website: http://chinadtrace.org/=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E51BAEAE-7296-4368-9505-638DC4420809>