After installing the VMware Container Service Extension, which install the vCD CLI in the process, vCD CLI kept failing to start and complaining about not finding sqlite3 module as showing below. I was installing on CentOS 8.1, but even then it sounds like the sqlite version included with CentOS is out of date for what vCD CLI require to be installed. Below is what the error looked like.
# vcd --help Traceback (most recent call last): File "/home/rohan/.local/lib/python3.7/site-packages/vcd_cli/browsercookie/__init__.py", line 18, in <module> from pysqlite2 import dbapi2 as sqlite3 ModuleNotFoundError: No module named 'pysqlite2' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/rohan/.local/bin/vcd", line 6, in <module> from vcd_cli.vcd import vcd File "/home/rohan/.local/lib/python3.7/site-packages/vcd_cli/vcd.py", line 121, in <module> from vcd_cli import login # NOQA File "/home/rohan/.local/lib/python3.7/site-packages/vcd_cli/login.py", line 24, in <module> from vcd_cli import browsercookie File "/home/rohan/.local/lib/python3.7/site-packages/vcd_cli/browsercookie/__init__.py", line 20, in <module> import sqlite3 File "/usr/local/lib/python3.7/sqlite3/__init__.py", line 23, in <module> from sqlite3.dbapi2 import * File "/usr/local/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module> from _sqlite3 import * ModuleNotFoundError: No module named '_sqlite3'
While the steps below is mainly focused on how to fix the issue to be able to install vCD or CSE, the same steps will be relevant to anyone having a similar ModuleNotFoundError: No module named ‘_sqlite3’ error in Python to install any other application.… Read More