Gentoo Archives: gentoo-user

From: cal <cal@×××××××××.technology>
To: gentoo-user@l.g.o, n952162 <n952162@×××.de>
Subject: Re: [gentoo-user] sqlite3 not available in python3?
Date: Sun, 15 Nov 2020 23:17:08
Message-Id: 825a86c1-abbc-9f44-4666-4a899467863e@mail.meme.technology
In Reply to: Re: [gentoo-user] sqlite3 not available in python3? by n952162
1 On 11/15/20 3:10 PM, n952162 wrote:
2 > On 11/16/20 12:06 AM, Manuel McLure wrote:
3 >>
4 >>
5 >> On Sun, Nov 15, 2020 at 2:59 PM n952162 <n952162@×××.de
6 >> <mailto:n952162@×××.de>> wrote:
7 >>
8 >>     I'm trying to convert python2 scripts to python3.  A script which
9 >>     works under python2 gives me this under python3:
10 >>
11 >>         ModuleNotFoundError: No module named 'sqlite3'
12 >>
13 >>     Any ideas?
14 >>
15 >> You might need to add "sqlite" to the USE flags for dev-lang/python
16 >> and reinstall.
17 >>
18 >> --
19 >> Manuel A. McLure WW1FA <manuel@××××××.org <mailto:manuel@××××××.org>>
20 >> <http://www.mclure.org <http://www.mclure.org>>
21 >> ...for in Ulthar, according to an ancient and significant law,
22 >> no man may kill a cat.                       -- H.P. Lovecraft
23 >
24 > $ equery uses python
25 > [ Legend : U - final flag setting for installation]
26 > [        : I - package is installed with flag     ]
27 > [ Colors : set, unset                             ]
28 >  * Found these USE flags for dev-lang/python-3.8.5:
29 >  U I
30 >  - - bluetooth : Build Bluetooth protocol support in socket module
31 >  - - build     : !!internal use only!! DO NOT SET THIS FLAG YOURSELF!,
32 > used for creating build images and the first half of bootstrapping [make
33 > stage1]
34 >  - - examples  : Install examples, usually source code
35 >  + + gdbm      : Add support for sys-libs/gdbm (GNU database libraries)
36 >  - - hardened  : Activate default security enhancements for toolchain
37 > (gcc, glibc, binutils)
38 >  + + ipv6      : Add support for IP version 6
39 >  - - libressl  : Use dev-libs/libressl instead of dev-libs/openssl when
40 > applicable (see also the ssl useflag)
41 >  + + ncurses   : Add ncurses support (console display library)
42 >  + + readline  : Enable support for libreadline, a GNU line-editing
43 > library that almost everyone wants
44 > * + + sqlite    : Add support for sqlite - embedded sql database*
45 >  + + ssl       : Add support for SSL/TLS connections (Secure Socket
46 > Layer / Transport Layer Security)
47 >  - - test      : Enable dependencies and/or preparations necessary to
48 > run tests (usually controlled by FEATURES=test but can be toggled
49 > independently)
50 >  - - tk        : Add support for Tk GUI toolkit
51 >  - - wininst   : Install Windows executables required to create an
52 > executable installer for MS Windows.
53 >  + + xml       : Add support for XML files
54 >
55 >
56 >
57
58 (My apologies, forgot to include the list on my previous reply)
59 What is the output of `python --version` for the interpreter you are
60 using to execute this script? Is it possible that your default python3
61 interpreter is not 3.8.5 and has different USE flags? (Keep in mind,
62 there may be multiple versions of python3 installed in different slots).
63
64 For example, on my machine, /usr/bin/python points to Python 3.6.12,
65 while equery uses python displays the USE flags for 3.9.0:
66
67 $ python --version
68 Python 3.6.12
69 $ equery uses python
70 * Found these USE flags for dev-lang/python-3.9.0:
71 [...]
72 $ equery uses dev-lang/python:3.6
73 * Found these USE flags for dev-lang/python-3.6.12:
74 [...]
75
76 You can set the default Python interpreter with eselect python list /
77 eselect python set.
78
79 Cal

Replies

Subject Author
Re: [gentoo-user] sqlite3 not available in python3? n952162 <n952162@×××.de>
Re: [gentoo-user] sqlite3 not available in python3? n952162 <n952162@×××.de>