By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,286 Members | 2,364 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,286 IT Pros & Developers. It's quick & easy.

python unix install, sqlite3

P: n/a
I installed the source code on unix for python 2.5.1. The install went
mainly okay, except for some failures regarding:
_ssl, _hashlib, _curses, _curses_panel.

No errors regarding sqlite3.
However, when I start python and do an import sqlite3 I get:

/ptmp/bin/python
Python 2.5.1 (r251:54863, May 29 2007, 05:19:30)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.
>>import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/__init__.py", line
24, in <module>
from dbapi2 import *
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/dbapi2.py", line 27,
in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3

May 29 '07 #1
Share this Question
Share on Google+
4 Replies


P: n/a
On May 29, 5:52 pm, Simon <resmi...@yahoo.comwrote:
I installed the source code on unix for python 2.5.1. The install went
mainly okay, except for some failures regarding:
_ssl, _hashlib, _curses, _curses_panel.

No errors regarding sqlite3.
However, when I start python and do an import sqlite3 I get:

/ptmp/bin/python
Python 2.5.1 (r251:54863, May 29 2007, 05:19:30)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.>>import sqlite3

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/__init__.py", line
24, in <module>
from dbapi2 import *
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/dbapi2.py", line 27,
in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
Some ideas:

I don't know if sqlite3 comes bundled with the standard Python source
bundle. My guess is not. If not, that's the cause of the error - you
need to install sqlite3 (and probably pysqlite3 (not sure of the name
(whether it has a trailing 3) which, if I remember, is the Python
binding/wrapper for sqlite3 (which is a C library, I think). Other
possible cause of the error (if sqlite3 _is_ bundled with Python and
no Python binding/wrapper is needed, is that sqlite3 depends on one of
those other libraries you mention (such as _hashlib) for which you got
errors while installing Python from source.

HTH
Vasudev Ram
Dancing Bison Enterprises
www.dancingbison.com
May 29 '07 #2

P: n/a
On Tuesday 29 May 2007 08:52, Simon wrote:
I installed the source code on unix for python
2.5.1. The install went mainly okay, except for
some failures regarding: _ssl, _hashlib,
_curses, _curses_panel.

No errors regarding sqlite3.
However, when I start python and do an import
sqlite3 I get:

/ptmp/bin/python
Python 2.5.1 (r251:54863, May 29 2007,
05:19:30) [GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or
"license" for more information.
>import sqlite3
I'm using python 2.5 on linux and it works fine
Try;
import sqlite3

in place of from sqlite3 import *

jim-on-linux
http://www.inqvista.com

Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File
"/ptmp/Python-2.5.1/lib/python2.5/sqlite3/__ini
t__.py", line 24, in <module>
from dbapi2 import *
File
"/ptmp/Python-2.5.1/lib/python2.5/sqlite3/dbapi
2.py", line 27, in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
May 29 '07 #3

P: n/a
On May 29, 7:05 am, vasudevram <vasudev...@gmail.comwrote:
On May 29, 5:52 pm, Simon <resmi...@yahoo.comwrote:


I installed the source code on unix for python 2.5.1. The install went
mainly okay, except for some failures regarding:
_ssl, _hashlib, _curses, _curses_panel.
No errors regarding sqlite3.
However, when I start python and do an import sqlite3 I get:
/ptmp/bin/python
Python 2.5.1 (r251:54863, May 29 2007, 05:19:30)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.>>import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/__init__.py", line
24, in <module>
from dbapi2 import *
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/dbapi2.py", line 27,
in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3

Some ideas:

I don't know if sqlite3 comes bundled with the standard Python source
bundle. My guess is not. If not, that's the cause of the error - you
need to install sqlite3 (and probably pysqlite3 (not sure of the name
(whether it has a trailing 3) which, if I remember, is the Python
binding/wrapper for sqlite3 (which is a C library, I think). Other
possible cause of the error (if sqlite3 _is_ bundled with Python and
no Python binding/wrapper is needed, is that sqlite3 depends on one of
those other libraries you mention (such as _hashlib) for which you got
errors while installing Python from source.

HTH
Vasudev Ram
Dancing Bison Enterpriseswww.dancingbison.com- Hide quoted text -

- Show quoted text -
Vasudev,
Thanks so much for the reply. I went to their website and your guess
was correct. Python 2.5 has included support for sqlite but it only
includes the PySqlite interface module (now called sqlite3). It does
not include sqlite3 with the source distribution.

Simon

May 29 '07 #4

P: n/a
On May 29, 11:40 pm, Simon <resmi...@yahoo.comwrote:
On May 29, 7:05 am, vasudevram <vasudev...@gmail.comwrote:


On May 29, 5:52 pm, Simon <resmi...@yahoo.comwrote:
I installed the source code on unix for python 2.5.1. The install went
mainly okay, except for some failures regarding:
_ssl, _hashlib, _curses, _curses_panel.
No errors regarding sqlite3.
However, when I start python and do an import sqlite3 I get:
/ptmp/bin/python
Python 2.5.1 (r251:54863, May 29 2007, 05:19:30)
[GCC 3.3.2] on sunos5
Type "help", "copyright", "credits" or "license" for more information.>>import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/__init__.py", line
24, in <module>
from dbapi2 import *
File "/ptmp/Python-2.5.1/lib/python2.5/sqlite3/dbapi2.py", line 27,
in <module>
from _sqlite3 import *
ImportError: No module named _sqlite3
Some ideas:
I don't know if sqlite3 comes bundled with the standard Python source
bundle. My guess is not. If not, that's the cause of the error - you
need to install sqlite3 (and probably pysqlite3 (not sure of the name
(whether it has a trailing 3) which, if I remember, is the Python
binding/wrapper for sqlite3 (which is a C library, I think). Other
possible cause of the error (if sqlite3 _is_ bundled with Python and
no Python binding/wrapper is needed, is that sqlite3 depends on one of
those other libraries you mention (such as _hashlib) for which you got
errors while installing Python from source.
HTH
VasudevRam
Dancing Bison Enterpriseswww.dancingbison.com-Hide quoted text -
- Show quoted text -

Vasudev,
Thanks so much for the reply. I went to their website and your guess
was correct. Python 2.5 has included support for sqlite but it only
includes the PySqlite interface module (now called sqlite3). It does
not include sqlite3 with the source distribution.

Simon
You're welcome, Simon. Good to hear that it worked :-)

Vasudev
Jun 4 '07 #5

This discussion thread is closed

Replies have been disabled for this discussion.