I'm currently playing a bit with the Pylons Python Web Framework and is trying to get it to work with Sqlalchemy and Sqlite.
I have installed py-pysqlite23, py-sqlite3 and python2.6 from ports.
When I'm not in a virtuelenv mode the command
[CMD=""]python -c 'import pysqlite2'[/CMD]
works fine.
But if I create a virtualenv with --no-site-packages
I get this
If I try to install it with easy_install I get this error message
Is it possible to fix this?
I have installed py-pysqlite23, py-sqlite3 and python2.6 from ports.
When I'm not in a virtuelenv mode the command
[CMD=""]python -c 'import pysqlite2'[/CMD]
works fine.
But if I create a virtualenv with --no-site-packages
I get this
Code:
(zbadminenv)[olav@olbsd ~/zbadmin]$ python -c 'import pysqlite2'
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named pysqlite2
If I try to install it with easy_install I get this error message
Code:
(zbadminenv)[olav@olbsd ~/zbadmin]$ easy_install pysqlite
Searching for pysqlite
Reading http://www.pylonshq.com/download/
Best match: pysqlite 2.5.6
Downloading http://cdn.pylonshq.com/download/1.0/pysqlite-2.5.6.tar.gz
Processing pysqlite-2.5.6.tar.gz
Running pysqlite-2.5.6/setup.py -q bdist_egg --dist-dir /tmp/easy_install-mrRfW0/pysqlite-2.5.6/egg-dist-tmp-E2BzUt
In file included from src/module.c:24:
src/connection.h:33:21: error: sqlite3.h: No such file or directory
In file included from src/module.c:24:
src/connection.h:38: error: expected specifier-qualifier-list before 'sqlite3'
In file included from src/module.c:25:
src/statement.h:37: error: expected specifier-qualifier-list before 'sqlite3'
src/module.c:265: error: 'SQLITE_OK' undeclared here (not in a function)
src/module.c:266: error: 'SQLITE_DENY' undeclared here (not in a function)
src/module.c:267: error: 'SQLITE_IGNORE' undeclared here (not in a function)
src/module.c:268: error: 'SQLITE_CREATE_INDEX' undeclared here (not in a function)
src/module.c:269: error: 'SQLITE_CREATE_TABLE' undeclared here (not in a function)
src/module.c:270: error: 'SQLITE_CREATE_TEMP_INDEX' undeclared here (not in a function)
src/module.c:271: error: 'SQLITE_CREATE_TEMP_TABLE' undeclared here (not in a function)
src/module.c:272: error: 'SQLITE_CREATE_TEMP_TRIGGER' undeclared here (not in a function)
src/module.c:273: error: 'SQLITE_CREATE_TEMP_VIEW' undeclared here (not in a function)
src/module.c:274: error: 'SQLITE_CREATE_TRIGGER' undeclared here (not in a function)
src/module.c:275: error: 'SQLITE_CREATE_VIEW' undeclared here (not in a function)
src/module.c:276: error: 'SQLITE_DELETE' undeclared here (not in a function)
src/module.c:277: error: 'SQLITE_DROP_INDEX' undeclared here (not in a function)
src/module.c:278: error: 'SQLITE_DROP_TABLE' undeclared here (not in a function)
src/module.c:279: error: 'SQLITE_DROP_TEMP_INDEX' undeclared here (not in a function)
src/module.c:280: error: 'SQLITE_DROP_TEMP_TABLE' undeclared here (not in a function)
src/module.c:281: error: 'SQLITE_DROP_TEMP_TRIGGER' undeclared here (not in a function)
src/module.c:282: error: 'SQLITE_DROP_TEMP_VIEW' undeclared here (not in a function)
src/module.c:283: error: 'SQLITE_DROP_TRIGGER' undeclared here (not in a function)
src/module.c:284: error: 'SQLITE_DROP_VIEW' undeclared here (not in a function)
src/module.c:285: error: 'SQLITE_INSERT' undeclared here (not in a function)
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: passing argument 1 of 'PyString_FromString' makes pointer from integer without a cast
error: Setup script exited with error: command 'cc' failed with exit status 1