Python 2.7.5 : ImportError: No module named _sqlite3

After compiling Python 2.7.5 you may find yourself being unable to to import sqlite3 and receiving the following error message,

ImportError: No module named _sqlite3

Solution

  1. Install sqlite-devel via ‘yum install sqlite-devel’
  2. Recompile Python.

Note : Details on how to compile Python can be found within the following article.

 

 

Rick Donato

Want to become a programming expert?

Here is our hand-picked selection of the best courses you can find online:
Python Zero to Hero course
Python Pro Bootcamp
Bash Scripting and Shell Programming course
Automate with Shell Scripting course
The Complete Web Development Bootcamp course
and our recommended certification practice exams:
AlphaPrep Practice Tests - Free Trial