1

I've installed python2.7 going through this tutorial: http://bicofino.io/2014/01/16/installing-python-2-dot-7-6-on-centos-6-dot-5/

everything's okay, but the python doesn't see sqlite module:

ImportError: No module named _sqlite3

Is there a possibility to install it manually ?

Thanks in advance,

pyt ho9
  • 83
  • 2
  • 7
  • How did you install python2.7? Manually from python.org? If you installed it with a package manager it should be importable as `import sqlite3` – costrouc Jan 19 '18 at 20:43
  • I downloaded and installed python from this page: http://www.python.org/ftp/python/2.7.8/Python-2.7.8.tar.xz – pyt ho9 Jan 19 '18 at 20:45

1 Answers1

0

I ran into this same issue when I was installing sqlite on a friends windows machine. You need to have the sqlite development files before installation. See link that people had this issue when installing on centos How to install pysqlite?

  • yum install sqlite-devel
  • cd <python directory>
  • ./configure --prefix=<installdir>; make; make install
costrouc
  • 3,045
  • 2
  • 19
  • 23
  • I have already installed sqlite-devel and ran those commands. Unfortunately it didn't solve the problem – pyt ho9 Jan 19 '18 at 20:54
  • Is this https://stackoverflow.com/questions/20126475/importerror-no-module-named-sqlite3-in-python3-3 or https://stackoverflow.com/questions/11394013/problems-with-python-2-7-3-on-centos-with-sqlite3-module any help? – costrouc Jan 19 '18 at 21:01
  • your answer is , I ran them once again and it worked – pyt ho9 Jan 19 '18 at 21:02