Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy pysqlite does not work properly?
    primarykey
    data
    text
    <p>I tried to install pysqlite. Some suspicious things start to appear during the installation. Why I typed:</p> <pre><code>python setup.py build </code></pre> <p>I got the following message in the end:</p> <pre><code>src/module.c:286: error: ‘SQLITE_PRAGMA’ undeclared here (not in a function) src/module.c:287: error: ‘SQLITE_READ’ undeclared here (not in a function) src/module.c:288: error: ‘SQLITE_SELECT’ undeclared here (not in a function) src/module.c:289: error: ‘SQLITE_TRANSACTION’ undeclared here (not in a function) src/module.c:290: error: ‘SQLITE_UPDATE’ undeclared here (not in a function) src/module.c:291: error: ‘SQLITE_ATTACH’ undeclared here (not in a function) src/module.c:292: error: ‘SQLITE_DETACH’ undeclared here (not in a function) src/module.c: In function ‘init_sqlite’: src/module.c:419: warning: implicit declaration of function ‘sqlite3_libversion’ src/module.c:419: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast error: command 'gcc' failed with exit status 1 </code></pre> <p>I just ignored the last line and decided to continue. So, I typed:</p> <pre><code>python setup.py install </code></pre> <p>And than, again, I got similar error message:</p> <pre><code>src/module.c:288: error: ‘SQLITE_SELECT’ undeclared here (not in a function) src/module.c:289: error: ‘SQLITE_TRANSACTION’ undeclared here (not in a function) src/module.c:290: error: ‘SQLITE_UPDATE’ undeclared here (not in a function) src/module.c:291: error: ‘SQLITE_ATTACH’ undeclared here (not in a function) src/module.c:292: error: ‘SQLITE_DETACH’ undeclared here (not in a function) src/module.c: In function ‘init_sqlite’: src/module.c:419: warning: implicit declaration of function ‘sqlite3_libversion’ src/module.c:419: warning: passing argument 1 of ‘PyString_FromString’ makes pointer from integer without a cast error: command 'gcc' failed with exit status 1 </code></pre> <p>After that I wanted to try if pysqlite works. If in the python-command-line mode I type</p> <pre><code>from pysqlite2 import * </code></pre> <p>Python does not complain. However, if I try to follow an exmaple in my book:</p> <pre><code>from pysqlite2 import dbapi2 as sqlite </code></pre> <p>I get a error message:</p> <pre><code>Traceback (most recent call last): File "&lt;stdin&gt;", line 1, in &lt;module&gt; File "pysqlite2/dbapi2.py", line 27, in &lt;module&gt; from pysqlite2._sqlite import * ImportError: No module named _sqlite </code></pre> <p>Does anybody have any ideas why it happens and how this problem can be solved. By the way, I have installed a new version of Python. "python -V" gives me "Python 2.6.2". Thank you in advance for any help.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload