Re: Installing PySQLite on OS X 10.4

2006-03-16 Thread Rob Cowie
Cheers. I should have read the installation notes more carefully :)

Rob C

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Fredrik Lundh
Rob Cowie wrote:

 There are some notes on the pysqlite wiki regarding modification of the
 setup.py script and I've followed them to no avail.

 Build and install appear to go smoothly but attempting to run the tests
 from the python interpreter fails. Likewise any attempt to utilise
 pysqlite2 in a python script fails.

it's might be a bit easier to help if you what you did when attempting to use
the library, and how things failed.

(if you get an ImportError, are you importing the right thing?  where did the
setup.py install step put the modules ?  is that directory on the Python path 
?)

/F 



-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie

Fredrik Lundh wrote:
 Rob Cowie wrote:

  There are some notes on the pysqlite wiki regarding modification of the
  setup.py script and I've followed them to no avail.
 
  Build and install appear to go smoothly but attempting to run the tests
  from the python interpreter fails. Likewise any attempt to utilise
  pysqlite2 in a python script fails.

 it's might be a bit easier to help if you what you did when attempting to use
 the library, and how things failed.

 (if you get an ImportError, are you importing the right thing?  where did the
 setup.py install step put the modules ?  is that directory on the Python 
 path ?)

 /F

True... I should have included this stuff.

the output from setup.py install indicates that an egg is constructed
and copied to
/Library/Python/2.3/site-packages/pysqlite-2.1.3-py2.3-macosx-10.4-ppc.egg.

At the python prompt, I can import pysqlite2 with no problems.

However, if I do from pysqlite2 import test as suggested after
installation, I get the following traceback...

Traceback (most recent call last):
  File stdin, line 1, in ?
  File pysqlite2/test/__init__.py, line 25, in ?
from pysqlite2.test import dbapi, types, userfunctions, factory,
transactions
  File pysqlite2/test/dbapi.py, line 26, in ?
import pysqlite2.dbapi2 as sqlite
  File pysqlite2/dbapi2.py, line 32, in ?
from pysqlite2._sqlite import *
ImportError: No module named _sqlite

If I view my site-packages dir in the Finder, the .egg file appears as
a document, instead of a directory as is usually the case with .eggs.
Perhaps this is an indication that the .egg file is not being built
correctly?

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Gerhard Häring
Rob Cowie wrote:
 [...]
 However, if I do from pysqlite2 import test as suggested after
 installation, I get the following traceback...

 Traceback (most recent call last):
   File stdin, line 1, in ?
   File pysqlite2/test/__init__.py, line 25, in ?
 from pysqlite2.test import dbapi, types, userfunctions, factory,
 transactions
   File pysqlite2/test/dbapi.py, line 26, in ?
 import pysqlite2.dbapi2 as sqlite
   File pysqlite2/dbapi2.py, line 32, in ?
 from pysqlite2._sqlite import *
 ImportError: No module named _sqlite
 [...]

Apparently, you're doing this from the pysqlite sources root directory. 
So the pysqlite2 directory is tried, which does ont include the compiled 
C extension module. Execuring from any other working directory on your 
system should work fine.

I'll have to check that this is all properly documented before I do the 
next pysqlite release.

-- Gerhard
-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Rob Cowie

Gerhard Häring wrote:
 Rob Cowie wrote:
  [...]
  However, if I do from pysqlite2 import test as suggested after
  installation, I get the following traceback...
 
  Traceback (most recent call last):
File stdin, line 1, in ?
File pysqlite2/test/__init__.py, line 25, in ?
  from pysqlite2.test import dbapi, types, userfunctions, factory,
  transactions
File pysqlite2/test/dbapi.py, line 26, in ?
  import pysqlite2.dbapi2 as sqlite
File pysqlite2/dbapi2.py, line 32, in ?
  from pysqlite2._sqlite import *
  ImportError: No module named _sqlite
  [...]

 Apparently, you're doing this from the pysqlite sources root directory.
 So the pysqlite2 directory is tried, which does ont include the compiled
 C extension module. Execuring from any other working directory on your
 system should work fine.

 I'll have to check that this is all properly documented before I do the
 next pysqlite release.

 -- Gerhard

Thanks however, now when I try from pysqlite2 import test it
results in:

Traceback (most recent call last):
  File stdin, line 1, in ?
  File
build/bdist.darwin-8.5.0-Power_Macintosh/egg/pysqlite2/test/__init__.py,
line 25, in ?
  File
build/bdist.darwin-8.5.0-Power_Macintosh/egg/pysqlite2/test/dbapi.py,
line 26, in ?
  File
build/bdist.darwin-8.5.0-Power_Macintosh/egg/pysqlite2/dbapi2.py,
line 32, in ?
  File
build/bdist.darwin-8.5.0-Power_Macintosh/egg/pysqlite2/_sqlite.py,
line 7, in ?
  File
build/bdist.darwin-8.5.0-Power_Macintosh/egg/pysqlite2/_sqlite.py,
line 6, in __bootstrap__
ImportError:
dlopen(/Users/rob/.python-eggs/pysqlite-2.1.3-py2.3-macosx-10.4-ppc.egg-tmp/pysqlite2/_sqlite.so,
2): Symbol not found: _sqlite3_transfer_bindings
  Referenced from:
/Users/rob/.python-eggs/pysqlite-2.1.3-py2.3-macosx-10.4-ppc.egg-tmp/pysqlite2/_sqlite.so
  Expected in: dynamic lookup

I now suspect that this may all be down to the version of sqlite3
installed as part of OS X 10.4. Some people report success when using
this version with pysqlite, others report failure.

-- 
http://mail.python.org/mailman/listinfo/python-list


Re: Installing PySQLite on OS X 10.4

2006-03-15 Thread Gerhard Häring
Rob Cowie wrote:
 [...]
 build/bdist.darwin-8.5.0-Power_Macintosh/egg/pysqlite2/_sqlite.py,
 line 6, in __bootstrap__
 ImportError:
 dlopen(/Users/rob/.python-eggs/pysqlite-2.1.3-py2.3-macosx-10.4-ppc.egg-tmp/pysqlite2/_sqlite.so,
 2): Symbol not found: _sqlite3_transfer_bindings
   Referenced from:
 /Users/rob/.python-eggs/pysqlite-2.1.3-py2.3-macosx-10.4-ppc.egg-tmp/pysqlite2/_sqlite.so
   Expected in: dynamic lookup
 
 I now suspect that this may all be down to the version of sqlite3
 installed as part of OS X 10.4. Some people report success when using
 this version with pysqlite, others report failure.

Quoting http://initd.org/pub/software/pysqlite/doc/install-source.html


SQLite:
 * SQLite version 3.2.2 or later (as of pysqlite 2.1.0).


You'll need to install a more recent SQLite version than the one shipped 
with OS X 10.4.

Alternatively, you could use pysqlite 2.0.7, which has less cool 
features, but works with your SQLite version. If you plan to stick to 
the DB-API and not use convenience features introduced in pysqlite 2.1 
it doesn't make any difference.

-- Gerhard
-- 
http://mail.python.org/mailman/listinfo/python-list