pysqlite2 インストール
pysqlite2をダウンロード:
http://code.google.com/p/pysqlite/downloads/listからpysqlite-2.6.3.tar.gzをダウンロードし、
tar xvf pysqlite-2.6.3.tar.gz
cd pysqlite-2.6.3
python setup.py build_static install
としたら、以下のエラーが起こった。
~/ダウンロード/pysqlite-2.6.3$ python setup.py build running build running build_py running build_ext building 'pysqlite2._sqlite' extension gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DMODULE_NAME="pysqlite2.dbapi2" -DSQLITE_OMIT_LOAD_EXTENSION=1 -I/usr/include/python2.7 -c src/module.c -o build/temp.linux-x86_64-2.7/src/module.o In file included from src/module.c:24:0: src/connection.h:26:20: 致命的エラー: Python.h: そのようなファイルやディレクトリはありません コンパイルを停止しました。 error: command 'gcc' failed with exit status 1
調べてみると、以下のようにすると良い。(多少模索的だが)
sudo apt-get install sqliteとし、
aptitude intall python2.6-devとしたが、駄目だった。
sudo apt-get install python-dev
の後にsudo apt-get install sqlite3とし、
sudo python setup.py build_static installとしたら、
python
>>import pysqlite2
はい、できた。