I try to install rasa x for testing purpose.
It installed successfully, but when I try to run it with --> " rasa x "
But face such an error:: ModuleNotFoundError: No module named ‘_sqlite3’
Anyone experience it ?
Traceback (most recent call last):
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 338, in dbapi
from pysqlite2 import dbapi2 as sqlite
ModuleNotFoundError: No module named 'pysqlite2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/x7/Python_Lib_Build/env-python/new-env/bin/rasa", line 10, in <module>
sys.exit(main())
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/rasa/__main__.py", line 70, in main
cmdline_arguments.func(cmdline_arguments)
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/rasa/cli/x.py", line 243, in rasa_x
local.main(args, project_path, args.data, token=rasa_x_token)
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/rasax/community/local.py", line 186, in main
session = utils.get_database_session(config.LOCAL_MODE, create_tables=True)
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/rasax/community/database/utils.py", line 104, in get_database_session
session_maker = create_session_maker(db_url, create_tables)
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/rasax/community/database/utils.py", line 74, in create_session_maker
engine = create_engine(url)
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/sqlalchemy/engine/__init__.py", line 435, in create_engine
return strategy.create(*args, **kwargs)
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 343, in dbapi
raise e
File "/home/x7/Python_Lib_Build/env-python/new-env/lib/python3.6/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 341, in dbapi
from sqlite3 import dbapi2 as sqlite # try 2.5+ stdlib name.
File "/usr/local/lib/python3.6/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "/usr/local/lib/python3.6/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
I installed Rasa X today (0.19.2), and I’m getting the same error when running rasa x. I’m using Python 3.7 and trying to upgrade an existing Rasa project.
$ rasa x
Starting Rasa X in local mode... 🚀
Traceback (most recent call last):
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 338, in dbapi
from pysqlite2 import dbapi2 as sqlite
ModuleNotFoundError: No module named 'pysqlite2'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/rasa/cli/x.py", line 322, in run_locally
local.main(args, project_path, args.data, token=rasa_x_token)
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/rasax/community/local.py", line 182, in main
with session_scope() as session:
File "<HOME>/.pyenv/versions/3.7.3/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/rasax/community/database/utils.py", line 95, in session_scope
session = create_session_maker(url)()
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/rasax/community/database/utils.py", line 83, in create_session_maker
engine = create_engine(url)
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/sqlalchemy/engine/__init__.py", line 435, in create_engine
return strategy.create(*args, **kwargs)
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/sqlalchemy/engine/strategies.py", line 87, in create
dbapi = dialect_cls.dbapi(**dbapi_args)
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 343, in dbapi
raise e
File "<HOME>/.local/share/virtualenvs/project_v2-4KUNLoe-/lib/python3.7/site-packages/sqlalchemy/dialects/sqlite/pysqlite.py", line 341, in dbapi
from sqlite3 import dbapi2 as sqlite # try 2.5+ stdlib name.
File "<HOME>/.pyenv/versions/3.7.3/lib/python3.7/sqlite3/__init__.py", line 23, in <module>
from sqlite3.dbapi2 import *
File "<HOME>/.pyenv/versions/3.7.3/lib/python3.7/sqlite3/dbapi2.py", line 27, in <module>
from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'
I had exactly the same problem while installing vCD CLI on Cent OS 8.1. I had to install a newer version of SQLite on my linux box then reinstall Pythin 3.7 after that. I have documented the full steps in here in case others are still stuck with it. As I hit this thread before resolving the issue and wanted to contribute back: