【发布时间】:2020-02-20 01:06:33
【问题描述】:
我的第一篇关于设置 Yocto 开发环境的帖子 在我的 Ubuntu 系统(Ubuntu 18.04.3 LTS/bionic)上,根据文档中包含的信息 此网页链接 (https://www.yoctoproject.org/docs/current/brief-yoctoprojectqs/brief-yoctoprojectqs.html)。
All is well until... ~/poky/build$ bitbake core-image-sato
which results in this error:
File "/usr/local/lib/python3.5/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named '_sqlite3'
Below is my effort to proceed past this error, which didn't resolve the
error above. Please be generous and provide some guidance. I searched for
relevant posting locations; any advice on a better place is appreciated.
Thank you.
------------------------------------------------
A web search on this error () results in:
How to Use SQLite in Ubuntu | Chron.com
with
~/poky/build$ sudo apt-get install sqlite3 libsqlite3-dev
which tells me this:
Reading package lists... Done
Building dependency tree
Reading state information... Done
libsqlite3-dev is already the newest version (3.22.0-1ubuntu0.1).
sqlite3 is already the newest version (3.22.0-1ubuntu0.1).
The following packages were automatically installed and are no longer
required:
linux-headers-5.0.0-23 linux-headers-5.0.0-23-generic linux-image-5.0.0-23-generic linux-modules-5.0.0-23-generic
linux-modules-extra-5.0.0-23-generic
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.
So, evidently sqlite3 exists on my system. Here are the SO references that I checked:
[ImportError: No module named '_sqlite3' in python3.3][1]
[importerror no module named '_sqlite3' python3.4][2]
[ImportError: No module named _sqlite3 (even after doing eveything)][3]
[ImportError: No module named _sqlite3][4]
[1]: https://stackoverflow.com/questions/20126475/importerror-no-module-named-sqlite3-in-python3-3
[2]: https://stackoverflow.com/questions/24052137/importerror-no-module-named-sqlite3-python3-4
[3]: https://stackoverflow.com/questions/35889383/importerror-no-module-named-sqlite3-even-after-doing-eveything
[4]: https://stackoverflow.com/questions/2665337/importerror-no-module-named-sqlite3
【问题讨论】:
-
据恩智浦半导体人称,Ubuntu_18.04需要Python3.6;然后我可以安装安装 sqlite3。我的系统安装了 Python3.5 和 Python3.6,在不同的目录中;可能是什么让 bitbake/Yocto 感到困惑。检查我的 Ubuntu_18.04 系统,我发现... Python3.6 安装在 /usr/bin/ 中... lrwxrwxrwx python3 -> python3.6 -rwxr-xr-x python3.6 其中 python3 指向 3.5 版本/usr/local/bin/ as... lrwxrwxrwx python3 -> python3.5 -rwxr-xr-x python3.5 /usr/local/bin/ 中到 3.5 的符号链接取代 /usr/bin 中到 3.6 的符号链接/。删除到 3.5 的链接?
标签: sqlite yocto ubuntu-18.04 bitbake