Since today, after CS50 ide has changed, I am not being able to run Django applications. This is because of an error occuring with sqlite3:

>>> import sqlite3
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.9/sqlite3/__init__.py", line 23, in <module>
    from sqlite3.dbapi2 import *
  File "/usr/local/lib/python3.9/sqlite3/dbapi2.py", line 27, in <module>
    from _sqlite3 import *
ModuleNotFoundError: No module named '_sqlite3'

How should I fix this?

  • same issue here
    – sbriscoe13
    Jan 1, 2021 at 17:46
  • also looking for an answer here. any help appreciated. have only found in other threads to install libsqlite3-dev, but not sure how to do this within the ide. Jan 1, 2021 at 17:52

1 Answer 1


Install sqlite3 with the command pip install pysqlite3. Can't say whether future 2021 changes to the IDE will render this moot, but it worked for me!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .