Problems installing PySQLite, SQLite and Trac

Discussion in 'Python' started by kimwlias, Feb 1, 2009.

  1. kimwlias

    kimwlias Guest

    My initial goal is to finally install Trac. This is the second day
    I've been trying to make this possible but I can't find, for the life
    of me, how to do this. OK, here is the story:

    My system is a VPS with CentOS 5.

    I found out that I have two versions of python: 2.4 at /usr/bin/
    python2.4 and 2.5.2 at /usr/local/apps/python/bin/python2.5

    My first try was to download the SQLite amalgamation, './configure',
    'make' and 'make install'. Then I downloaded the PySQLite and 'python
    setup.py install'. The funny part is that python2.4 has sqlite while
    python2.5 doesn't:



    [root@xxx]# python
    Python 2.5.2 (r252:60911, May 10 2008, 17:42:40)
    [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
    Type "help", "copyright", "credits" or "license" for more
    information.
    >>> import sqlite

    Traceback (most recent call last):
    File "", line 1, in
    ImportError: No module named sqlite

    [root@xxx]# python2.4
    Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
    [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
    Type "help", "copyright", "credits" or "license" for more
    information.
    >>> import sqlite
    >>>


    After some more research I found out that the amalgamation is not the
    default way and I needed to run the extended_setup.py which isn't
    inside the pysqlite! -> http://oss.itsystementwicklung.de/trac/pysqlite/wiki/PysqliteAmalgamation

    I then thought, "OK, let's install the SQLite from the precompiled
    binary packages". So I downloaded the first two packages from here:
    http://www.sqlite.org/download.html . The one contains a .bin file and
    the other an .so file. I must admit, I'm relatively new in Linux so I
    don't know what do with these files. And there is NO DOCUMENTATION
    what so ever on how to use these two in the SQLite website. Not even a
    slight hint where to look for. The so called documentation is just a
    download version of the website....

    You can find some more information about my problem here:
    http://stackoverflow.com/questions/500055/issues-installing-sqlite-pysqlite-trac-in-centos

    I really really really need your help. Thank you so much in advance.
     
    kimwlias, Feb 1, 2009
    #1
    1. Advertising

  2. kimwlias

    Jon Clements Guest

    On 1 Feb, 15:48, kimwlias <> wrote:
    > My initial goal is to finally install Trac. This is the second day
    > I've been trying to make this possible but I can't find, for the life
    > of me, how to do this. OK, here is the story:
    >
    > My system is a VPS with CentOS 5.
    >
    > I found out that I have two versions of python: 2.4 at /usr/bin/
    > python2.4 and 2.5.2 at /usr/local/apps/python/bin/python2.5
    >
    > My first try was to download the SQLite amalgamation, './configure',
    > 'make' and 'make install'. Then I downloaded the PySQLite and 'python
    > setup.py install'. The funny part is that python2.4 has sqlite while
    > python2.5 doesn't:
    >
    >     [root@xxx]# python
    >     Python 2.5.2 (r252:60911, May 10 2008, 17:42:40)
    >     [GCC 4.1.2 20070626 (Red Hat 4.1.2-14)] on linux2
    >     Type "help", "copyright", "credits" or "license" for more
    > information.
    >     >>> import sqlite
    >     Traceback (most recent call last):
    >     File "", line 1, in
    >     ImportError: No module named sqlite
    >
    >     [root@xxx]# python2.4
    >     Python 2.4.3 (#1, Mar 14 2007, 18:51:08)
    >     [GCC 4.1.1 20070105 (Red Hat 4.1.1-52)] on linux2
    >     Type "help", "copyright", "credits" or "license" for more
    > information.
    >     >>> import sqlite
    >     >>>
    >
    > After some more research I found out that the amalgamation is not the
    > default way and I needed to run the extended_setup.py which isn't
    > inside the pysqlite! ->http://oss.itsystementwicklung.de/trac/pysqlite/wiki/PysqliteAmalgama...
    >
    > I then thought, "OK, let's install the SQLite from the precompiled
    > binary packages". So I downloaded the first two packages from here:http://www.sqlite.org/download.html. The one contains a .bin file and
    > the other an .so file. I must admit, I'm relatively new in Linux so I
    > don't know what do with these files. And there is NO DOCUMENTATION
    > what so ever on how to use these two in the SQLite website. Not even a
    > slight hint where to look for. The so called documentation is just a
    > download version of the website....
    >
    > You can find some more information about my problem here:http://stackoverflow.com/questions/500055/issues-installing-sqlite-py...
    >
    > I really really really need your help. Thank you so much in advance.


    IIRC, pysqlite was a wrapper for the SQLite library. However, in
    version 2.5+ of Python, it's part of the standard distribution and is
    in the module called sqlite3. Just walking throuh the instructions
    (although I only have 2.5.2 installed gives me this):

    Python 2.5.2 (r252:60911, Oct 5 2008, 19:24:49)
    [GCC 4.3.2] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import sqlite3
    >>> import pysqlite2



    Are you trying to set up using 2.4 or 2.5? I'm just a little confused
    as to why if sqlite works on 2.4 which looking at the installation
    instruction [ref: http://www.installationwiki.org/Installing_Trac_and_Subversion#Python]
    is what's recommended, is what the problem is?

    As you're under a redhat derivative, perhaps it might be worth just
    getting the rpm(s) for pysqlite2 and that might well sort it out for
    you.

    Sorry to have not been of more help,

    Jon.
     
    Jon Clements, Feb 1, 2009
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ilias Lazaridis
    Replies:
    11
    Views:
    474
    George Sakkis
    Feb 19, 2008
  2. Steve Holden
    Replies:
    2
    Views:
    350
    Ilias Lazaridis
    Feb 18, 2008
  3. Ilias Lazaridis
    Replies:
    0
    Views:
    306
    Ilias Lazaridis
    Mar 9, 2008
  4. Ilias Lazaridis
    Replies:
    12
    Views:
    210
    George Sakkis
    Feb 19, 2008
  5. Ilias Lazaridis
    Replies:
    7
    Views:
    189
    George Sakkis
    Feb 19, 2008
Loading...

Share This Page