Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Gentoo: User

No module named sqlite3

 

 

Gentoo user RSS feed   Index | Next | Previous | View Threaded


ddjones at riddlemaster

Jan 8, 2011, 1:46 PM

Post #1 of 8 (1978 views)
Permalink
No module named sqlite3

I'm trying to install keepnote:

http://rasm.ods.org/keepnote/

It's not in portage but there's a downloadable ebuild at the site. Emerging
the package, I get the following error:

File "/var/tmp/portage/app-
text/keepnote-0.6.7/work/keepnote-0.6.7/keepnote/notebook/index.py", line 33,
in <module>
import sqlite3 as sqlite
ImportError: No module named sqlite3

I have both sqlite and pysqlite installed. The library _sqlite.so exists in
directory /usr/lib/python2.6/site-packages/pysqlite2/.

From the python command line:

---------------------------------------------------------------------------
>>> import sys

>>> print sys.path
[.'', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-
linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages',
'/usr/lib/python2.6/site-packages/gtk-2.0', '/usr/lib/portage/pym']

>>> sys.path.append('/usr/lib/python2.6/site-packages/pysqlite2/')

>>> import sqlite3
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named sqlite3

>>> print sys.path
[.'', '/usr/lib/python26.zip', '/usr/lib/python2.6', '/usr/lib/python2.6/plat-
linux2', '/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/site-packages',
'/usr/lib/python2.6/site-packages/gtk-2.0', '/usr/lib/portage/pym',
'/usr/lib/python2.6/site-packages/pysqlite2/']
---------------------------------------------------------------------------

I believe the python sys.path was sufficient but even adding the specific
directory resulted in failing to import the module.

I've run python-updater, re-emerged sqlite and pysqlite and am still getting
the error. Any ideas or suggestions greatly appreciated.

--
"Men like to pursue an elusive woman like a cake of wet soap - even men who
hate baths." - Gelett Burgess


xav at gentooist

Jan 8, 2011, 1:54 PM

Post #2 of 8 (1956 views)
Permalink
Re: No module named sqlite3 [In reply to]

Le 08/01/2011 22:46, Daniel D Jones a écrit :
> I'm trying to install keepnote:
>
> http://rasm.ods.org/keepnote/
>
> It's not in portage but there's a downloadable ebuild at the site. Emerging
> the package, I get the following error:
>
> File "/var/tmp/portage/app-
> text/keepnote-0.6.7/work/keepnote-0.6.7/keepnote/notebook/index.py", line 33,
> in<module>
> import sqlite3 as sqlite
> ImportError: No module named sqlite3

Sqlite is slotted, you need to install sqlite version 3 slot. Once it's
done, it should work out of the box.

> I have both sqlite and pysqlite installed. The library _sqlite.so exists in
> directory /usr/lib/python2.6/site-packages/pysqlite2/.

[SNIP]

--
Xavier Parizet
http://gentooist.com


mail at tweinbrenner

Jan 8, 2011, 2:33 PM

Post #3 of 8 (1946 views)
Permalink
Re: No module named sqlite3 [In reply to]

Am 08.01.2011 22:46, schrieb Daniel D Jones:

> I've run python-updater, re-emerged sqlite and pysqlite and am still getting
> the error. Any ideas or suggestions greatly appreciated.

I had a similar problem. If I remember correctly (and I am not sure that
I do) I solved it by re-emerging python itself.

HTH


peter at humphrey

Jan 8, 2011, 4:11 PM

Post #4 of 8 (1954 views)
Permalink
Re: No module named sqlite3 [In reply to]

On Saturday 08 January 2011 21:46:08 Daniel D Jones wrote:

> I've run python-updater, re-emerged sqlite and pysqlite and am still
> getting the error.

How many versions of python do you have installed? I found I had three:

$ eselect python list
Available Python interpreters:
[1] python2.6 *
[2] python2.7
[3] python3.1

$ sudo eselect python set 2

After that python-updater found 75 packages to remerge. It's running
now. I'm heartily glad I didn't just go and unmerge 2.6 without checking
first!

--
Rgds
Peter. Linux Counter 5290, 1994-04-23.


ddjones at riddlemaster

Jan 8, 2011, 4:12 PM

Post #5 of 8 (1966 views)
Permalink
Re: No module named sqlite3 [In reply to]

On Saturday, January 08, 2011 16:54:21 Xavier Parizet wrote:
> Le 08/01/2011 22:46, Daniel D Jones a écrit :
> > I'm trying to install keepnote:
> >
> > http://rasm.ods.org/keepnote/
> >
> > It's not in portage but there's a downloadable ebuild at the site.
> > Emerging the package, I get the following error:
> >
> > File "/var/tmp/portage/app-
> > text/keepnote-0.6.7/work/keepnote-0.6.7/keepnote/notebook/index.py", line
> > 33, in<module>
> >
> > import sqlite3 as sqlite
> >
> > ImportError: No module named sqlite3
>
> Sqlite is slotted, you need to install sqlite version 3 slot. Once it's
> done, it should work out of the box.

root [at] merli / $eix dev-db/sqlite
[I] dev-db/sqlite
Available versions:
(0) 2.8.16-r4!t
(3) 3.7.2 ~3.7.3 ~3.7.4
{debug doc (+)extensions +fts3 icu nls +readline secure-delete soundex
tcl test +threadsafe unlock-notify}
Installed versions: 3.7.2(3)(04:19:05 PM 01/08/2011)(extensions fts3
readline threadsafe -debug -doc -icu -secure-delete -soundex -tcl -test -
unlock-notify)
Homepage: http://sqlite.org/
Description: A SQL Database Engine in a C Library

Unless I'm misreading something, slot 3 is installed and is the only slot
installed.

--
"I am not afraid of tomorrow, for I have seen yesterday and I love today." -
William Allen White, American journalist (1868-1944)


ddjones at riddlemaster

Jan 8, 2011, 4:25 PM

Post #6 of 8 (1949 views)
Permalink
Re: No module named sqlite3 [In reply to]

On Saturday, January 08, 2011 17:33:18 Thomas Weinbrenner wrote:
> Am 08.01.2011 22:46, schrieb Daniel D Jones:
> > I've run python-updater, re-emerged sqlite and pysqlite and am still
> > getting the error. Any ideas or suggestions greatly appreciated.
>
> I had a similar problem. If I remember correctly (and I am not sure that
> I do) I solved it by re-emerging python itself.

Thanks for the response. Reemerged python and still get the same error.

--
"Debauchee, n. One who has so earnestly pursued pleasure that he has had the
misfortune to overtake it." - Ambrose Bierce


ddjones at riddlemaster

Jan 8, 2011, 4:32 PM

Post #7 of 8 (1953 views)
Permalink
Re: No module named sqlite3 [In reply to]

On Saturday, January 08, 2011 19:11:50 Peter Humphrey wrote:
> On Saturday 08 January 2011 21:46:08 Daniel D Jones wrote:
> > I've run python-updater, re-emerged sqlite and pysqlite and am still
> > getting the error.
>
> How many versions of python do you have installed? I found I had three:
>
> $ eselect python list
> Available Python interpreters:
> [1] python2.6 *
> [2] python2.7
> [3] python3.1

root [at] merli /usr/lib/python2.6/site-packages/pysqlite2 $eselect python list
Available Python interpreters:
[1] python2.6 *
[2] python3.1

> $ sudo eselect python set 2

Is there any reason python shouldn't be set to version 3? Are there backwards
compatibility issues that will break things?

--
"The gods are dead, but in their name
Humanity is sold to shame,
While (then as now!) the tinsel'd Priest
Sitteth with robbers at the feast,
Blesses the laden blood-stain'd board,
Weaves garlands round the butcher's sword,
And poureth freely (now as then)
The sacramental blood of Men!"
- Robert Buchanan, Scottish poet, novelist, and playwright (1841-1901)


keith at dartworks

Jan 8, 2011, 11:39 PM

Post #8 of 8 (1943 views)
Permalink
Re: No module named sqlite3 [In reply to]

=== On Sat, 01/08, Daniel D Jones wrote: ===
> Is there any reason python shouldn't be set to version 3? Are there
> backwards compatibility issues that will break things?

===

Yes, many. It will be years more before the Python world is fully
migrated to version 3.



-- Keith Dart

--

-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Keith Dart <keith [at] dartworks>
public key: ID: 19017044
<http://www.dartworks.biz/>
=====================================================================

Gentoo user RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.