Page 1 of 1

sqlite module not found, python 2.7 redhat(-based) linux

Posted: August 28th, 2010, 5:34 pm
by davidber
I did a 'search the forums' and didn't find an answer :)

So I thought I would post away.

Trying to get .5.4 working on a linux box.

I installed python 2.6 and python 2.7 and am getting this message.

Code: Select all

python SABnzbd.py -s localhost:9090
Sorry, requires Python module sqlite3 (pysqlite2 in python2.4)
Try: apt-get install python-pysqlite2
So I thought that pysqlite was not installed.

So I did this:

Code: Select all

python
Python 2.7 (r27:82500, Aug 28 2010, 14:57:07) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> help('modules')

Please wait a moment while I gather a list of all available modules...

BaseHTTPServer      asynchat            imghdr              shelve
Bastion             asyncore            imp                 shlex
CDROM               atexit              importlib           shutil
CGIHTTPServer       audiodev            imputil             signal
Canvas              audioop             inspect             site
Cheetah             base64              io                  smtpd
ConfigParser        bdb                 itertools           smtplib
Cookie              binascii            json                sndhdr
DLFCN               binhex              keyword             socket
Dialog              bisect              lib2to3             spwd
DocXMLRPCServer     bsddb               linecache           sqlite3
FileDialog          cPickle             linuxaudiodev       sre
FixTk               cProfile            locale              sre_compile
HTMLParser          cStringIO           logging             sre_constants
IN                  calendar            macpath             sre_parse
MimeWriter          cgi                 macurl2path         ssl
Queue               cgitb               mailbox             stat
ScrolledText        cherrypy            mailcap             statvfs
SimpleDialog        chunk               markupbase          string
SimpleHTTPServer    cmath               marshal             stringold
SimpleXMLRPCServer  cmd                 math                stringprep
SocketServer        code                md5                 strop
StringIO            codecs              mhlib               struct
TYPES               codeop              mimetools           subprocess
Tix                 collections         mimetypes           sunau
Tkconstants         colorsys            mimify              sunaudio
Tkdnd               commands            mmap                symbol
Tkinter             compileall          modulefinder        symtable
UserDict            compiler            multifile           sys
UserList            contextlib          multiprocessing     sysconfig
UserString          cookielib           mutex               syslog
_LWPCookieJar       copy                netrc               tabnanny
_MozillaCookieJar   copy_reg            new                 tarfile
__builtin__         crypt               nis                 telnetlib
__future__          csv                 nntplib             tempfile
_abcoll             ctypes              ntpath              termios
_ast                curses              nturl2path          test
_bisect             datetime            numbers             textwrap
_codecs             dbhash              opcode              this
_codecs_cn          decimal             operator            thread
_codecs_hk          difflib             optparse            threading
_codecs_iso2022     dircache            os                  time
_codecs_jp          dis                 os2emxpath          timeit
_codecs_kr          distutils           ossaudiodev         tkColorChooser
_codecs_tw          dl                  parser              tkCommonDialog
_collections        doctest             pdb                 tkFileDialog
_csv                dumbdbm             pickle              tkFont
_ctypes             dummy_thread        pickletools         tkMessageBox
_ctypes_test        dummy_threading     pipes               tkSimpleDialog
_elementtree        email               pkgutil             toaiff
_functools          encodings           platform            token
_heapq              errno               plistlib            tokenize
_hotshot            exceptions          popen2              trace
_io                 fcntl               poplib              traceback
_json               filecmp             posix               ttk
_locale             fileinput           posixfile           tty
_lsprof             fnmatch             posixpath           turtle
_md5                formatter           pprint              types
_multibytecodec     fpformat            profile             unicodedata
_multiprocessing    fractions           pstats              unittest
_pyio               ftplib              pty                 urllib
_random             functools           pwd                 urllib2
_sha                future_builtins     py_compile          urlparse
_sha256             gc                  pyclbr              user
_sha512             genericpath         pydoc               uu
_socket             getopt              pydoc_data          uuid
_sre                getpass             pyexpat             warnings
_strptime           gettext             quopri              wave
_struct             glob                random              weakref
_symtable           grp                 re                  webbrowser
_testcapi           gzip                repr                whichdb
_threading_local    hashlib             resource            wsgiref
_warnings           heapq               rexec               xdrlib
_weakref            hmac                rfc822              xml
_weakrefset         hotshot             rlcompleter         xmllib
abc                 htmlentitydefs      robotparser         xmlrpclib
aifc                htmllib             runpy               xxsubtype
antigravity         httplib             sched               zipfile
anydbm              idlelib             select              zipimport
argparse            ihooks              sets                
array               imageop             sgmllib             
ast                 imaplib             sha                 

Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose descriptions contain the word "spam".

>>> 
So now I am confused as it is showing that it is installed.


Anyone have any ideas? Thanks in advance.

Re: sqlite module not found, python 2.7 redhat(-based) linux

Posted: August 29th, 2010, 12:22 pm
by jcfp
Careful, python 2.7 isn't tested/supported by the devs yet.

Re: sqlite module not found, python 2.7 redhat(-based) linux

Posted: August 29th, 2010, 12:28 pm
by davidber
Thanks for the 2.7 point about testing :)

I solved my own stupidity :)

After I did a ./configure, make, make install I did a python setup.py install  - I didn't see this on the screen as it had scrolled by while I went to get something to drink :)

Code: Select all

Python build finished, but the necessary bits to build these modules were not found:
_bsddb             _curses            _curses_panel   
_sqlite3           _ssl               _tkinter        
bsddb185           bz2                dbm             
gdbm               readline           sunaudiodev     
zlib                                                  
To find the necessary bits, look in setup.py in detect_modules() for the module's name.

So a very simple yum install sqlite-devel, then another round of ./configure, make, make install and python setup.py install and voila, sab starts.  I have no idea if it is gonna crash though, but it is running so far :)

Thanks.
dave