2

I am attempting to install the pysqlite module for Python 2.7 on my Windows 10 computer. I issued the following command:

pip install pysqlite

The installation ran as usual until it hit an error:

c:\users\xaresys\appdata\local\temp\pip-build-xleoab\pysqlite\src\connection.h(33) : fatal error C1083: Cannot open include file: 'sqlite3.h': No such file or directory error: command 'C:\Users\xaresys\AppData\Local\Programs\Common\Microsoft\Visual C++ for Python\9.0\VC\Bin\cl.exe' failed with exit status 2

I also tried to install a similar module, pysqlcipher, which hit the same error. Do I need to install anything before installing this? Thanks.

Paul Rooney
  • 20,879
  • 9
  • 40
  • 61
xaresys
  • 31
  • 1
  • 3
  • 7
  • Have you installed the sqlite3 library itself? If so, did you install it from source, or with a binary installer? You'll need the source (development) version of the sqlite3 library. –  May 26 '17 at 03:57
  • 1
    Depending on how Python is installed on your machine, you may be able to simply use the built-in `sqlite3` module instead. –  May 26 '17 at 03:58
  • I have not installed any sqlite3 related files on my computer before. Is there a specific way I must install sqlite3 to work with pysqlcipher? – xaresys May 26 '17 at 15:30
  • First, check if you can import sqlite3 on your Python prompt? –  May 26 '17 at 23:02
  • NB: did your question change from "attempting to install pysqlite" to "attempting to install pysqlcipher"? –  May 26 '17 at 23:03
  • At first I was trying to install pysqlcipher, but since that didn't work, I thought it needed pysqlite as a dependency. Then when I tried to install that, it threw the error in the OP. I guess I should've included that in the post. – xaresys May 27 '17 at 00:22
  • You got its solution or not? – suv Aug 07 '18 at 11:25
  • I have not @suv. – xaresys Aug 14 '18 at 05:46
  • Please try to follow [this answer](https://stackoverflow.com/a/53949490/10520161) – Yaniv Levinsky Dec 27 '18 at 18:46

1 Answers1

0

Looks like you are missing Visual C++ binaries which are required to install some packages. Follow instructions here: https://github.com/develersrl/gccwinbinaries

usernamenotfound
  • 1,540
  • 2
  • 11
  • 18
  • its not woking for me, I am having the same error while trying to run "pip install pysqlcipher" – suv Aug 07 '18 at 11:42