473,394 Members | 1,089 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Installing PySQLite on OS X 10.4

Hi all,

I'm having difficulty installing pysqlite 2.1.3 on Mac OS X 10.4.4

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.

Has anyone here successfully installed it?

If you have, do you have any pearls of wisdom that might help me out?

Cheers,

Rob C

Mar 15 '06 #1
6 4356
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>

Mar 15 '06 #2

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?

Mar 15 '06 #3
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
Mar 15 '06 #4

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.

Mar 15 '06 #5
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/pysqli...ll-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
Mar 15 '06 #6
Cheers. I should have read the installation notes more carefully :)

Rob C

Mar 16 '06 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Martin Maney | last post by:
Apologies if this isn't news here - I've been too busy this last week or so for even skimming the traffic here, in part because I've been messing around with Ubuntu's preview release on a spare...
1
by: F. GEIGER | last post by:
I've troubles to let my app take off using pysqlite. What I wonder most for now is that "pysqlite2.dbapi2.OperationalError: cannot commit transaction - SQL statements in progress" when I do this:...
2
by: F. GEIGER | last post by:
In my wxPython-app a part of it gathers data, when a button is pressed, and stores it into a db. The GUI part should display the stuff being stored in the db. When both parts work on the same...
1
by: DurumDara | last post by:
Hi ! I have this code in my program. Before this I use APSW, but that project's connection object doesn't have close method... .... crs.execute(*'''create table files (*f_id integer not null...
1
by: Michael Husmann | last post by:
After upgrading from pysqlite 2.0.5 to pysqlite 2.3.0 writing into a sqlite database increases memory consumption heavily. A similar program with Ruby and sqlite-ruby 1.1.0 does not affect memory...
11
by: rg1008 | last post by:
SInce yesterday, i have been geeting the following error on pysqlite.org (and also on initd.org): Service Temporarily Unavailable The server is temporarily unable to service your request due to...
14
by: Nader Emami | last post by:
I have installed "TurboGears" and I would install 'pysqlite' also. I am a user on a Linux machine. If I try to install the 'pysqlite' with 'easy_install' tool I get the next error message. The...
5
by: =?ISO-8859-1?Q?Gerhard_H=E4ring?= | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 pysqlite 2.5.0 released ======================= I'm pleased to announce the availability of pysqlite 2.5.0. This is a release with major new...
15
by: Kurda Yon | last post by:
Hi, I try to "build" and "install" pysqlite? After I type "python setup.py build" I get a lot of error messages? The first error is "src/ connection.h:33:21: error: sqlite3.h: No such file or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.