I'm working on a project which implements sqlite databases from Python 3.6. It works fine when the script is run from the editor, but when I freeze it using cx_Freeze, the executable crashes immediately. It appears to be the line 'import sqlite3' that causes the problem (the executable runs as expected otherwise):
import sqlite3
print("Done")
input()
causes a crash, but
# import sqlite3
print("Done")
input()
works fine. Some other websites suggested I should put the sqlite3 source code in my project folder, but I haven't managed to find a way of doing that. Is that the right approach, and if so, how should I go about it? OS is Windows 10 and setup script is
import sys
from cx_Freeze import setup, Executable
setup(
name="Test Executable",
version="1.0",
description="sqlite test exe"
executables=[Executable("test.py", base=None)]
)