4

i use kali linux and i need sqlite3 driver for python3.4.2 i tried the pysqlite install, but get an erorr. pls help me how to correct the erorr thanks in advance

root@thinkpad:~# python --version
Python 3.4.2
root@thinkpad:~# pip --version
pip 1.5.6 from /usr/local/lib/python3.4/site-packages (python 3.4)

root@thinkpad:~# pip install pysqlite
Downloading/unpacking pysqlite
  Downloading pysqlite-2.6.3.tar.gz (76kB): 76kB downloaded
  Running setup.py (path:/tmp/pip_build_root/pysqlite/setup.py) egg_info for package pysqlite
    Traceback (most recent call last):
      File "<string>", line 17, in <module>
      File "/tmp/pip_build_root/pysqlite/setup.py", line 85
        print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."
                                                                           ^
    SyntaxError: Missing parentheses in call to 'print'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 17, in <module>

  File "/tmp/pip_build_root/pysqlite/setup.py", line 85

    print "Is sphinx installed? If not, try 'sudo easy_install sphinx'."

                                                                       ^

SyntaxError: Missing parentheses in call to 'print'

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/pysqlite
Storing debug log for failure in /root/.pip/pip.log
Droid
  • 1,410
  • 8
  • 23
  • 37
  • @DanielRoseman okey but how to use sqlite3 for django1.7 and python3.4.2 – Droid Oct 18 '14 at 10:18
  • You follow the Django instructions, which are quite clear. Where exactly are you having problems? – Daniel Roseman Oct 18 '14 at 10:26
  • @DanielRoseman >>> import sqlite3 Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python3.4/sqlite3/__init__.py", line 23, in from sqlite3.dbapi2 import * File "/usr/local/lib/python3.4/sqlite3/dbapi2.py", line 27, in from _sqlite3 import * ImportError: No module named '_sqlite3' – Droid Oct 18 '14 at 10:35
  • Your Python compiled without support for `sqlite`. How did you install it? Did you have the `sqlite` development headers installed when you compiled it? – Martijn Pieters Feb 24 '15 at 18:03
  • I have a legitim case for this use case. pysqlite3 comes by default without the "enable_load_extension"[1] method in Python3 for many Linux Distros. So a pip install pysqlite should do the work. But that error while installing suggest that pysqlite is not Python3 capable, but: How did i get it in Pyhon3 in the first place?. [1] https://pysqlite.readthedocs.org/en/latest/sqlite3.html#sqlite3.Connection.enable_load_extension – jgomo3 Feb 25 '15 at 20:10
  • possible duplicate of [Install pysqlite in virtualenv with python3 support](http://stackoverflow.com/questions/23181197/install-pysqlite-in-virtualenv-with-python3-support) – jgomo3 Feb 26 '15 at 14:39

0 Answers0