I'm working with IMX8M NANO EVK running 4.14.98-2.1.0 release and python3-sqlite3 doesn't seem work:
root@imx8mn:~# python3
Python 3.5.5 (default, Mar 10 2020, 00:13:12)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sqlite3
>>> conn = sqlite3.connect('example.db')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: module 'sqlite3' has no attribute 'connect'
I checked and libsqlite3 package is installed on the filesystem.
Has anyone tried python3-sqlite3 there, or on any other platform, on any NXP Yocto release?
Hello Sergei,
You need python 3.6 to install sqlite3, in yocto you have python 3.5
Regards
Thanks.
You mean that the error has been fixed since the Yocto recipe for python3.6.
In fact, this particular commit from the poky repo does the fix:
commit f51d0a19afeb3cf9b5bad6e3b470b2a8fb6065f8
Author: Ross Burton <ross.burton@intel.com>
Date: Fri Sep 28 17:06:14 2018 +0100
python3: move sqlite files into python-sqlite
sqlite3/__init__.py was accidentally included in python3-misc.
(From OE-Core rev: 4e397e16996662bce51608cf5e20448b9803c476)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>