Re: [pysqlite] sqlite and python
massimo di stefano <[email protected]> Wed, 25 Mar 2009 19:08:55 +0100
| Newsgroups | gmane.comp.python.db.pysqlite.user,gmane.comp.python.apple |
|---|---|
| Message-ID | <[email protected]> |
--===============0093521856==
Content-Type: multipart/alternative; boundary=Apple-Mail-1--148186147
--Apple-Mail-1--148186147
Content-Type: text/plain;
charset=US-ASCII;
format=flowed;
delsp=yes
Content-Transfer-Encoding: 7bit
Hi Ned, All,
i followed that way too,
i downloaded the bynary version for pysqlite osx intel
i copied all the files under :
/Users/Shared/source/spatialite/
|
bin/
|
lib/
|
include/
in my .bash_profile i added :
LD_LIBRARY_PATH=/Users/Shared/source/spatialite/lib
export LD_LIBRARY_PATH
then i removed and reinstalled pysqlite :
sudo rm -rf /Library/Python/2.5/site-packages/pysqlite2 /Library/
Python/2.5/site-packages/pysqlite-2.5.0-py2.5.egg-info
quit terminal.app and open a new one,
rebuild pysqlite, these the log :
http://www.geofemengineering.it/pysqlite_osx_log_2.txt
then in python :
>>> from pysqlite2 import dbapi2 as sqlite
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.5/site-packages/pysqlite2/dbapi2.py", line
27, in <module>
from pysqlite2._sqlite import *
ImportError: dlopen(/Library/Python/2.5/site-packages/pysqlite2/
_sqlite.so, 2): Symbol not found: _sqlite3_enable_load_extension
Referenced from: /Library/Python/2.5/site-packages/pysqlite2/
_sqlite.so
Expected in: dynamic lookup
>>>
p.s.
[ i tried also to use :
DYLD_LIBRARY_PATH=/Users/Shared/source/spatialite/lib
export DYLD_LIBRARY_PATH
that seems to be what man dyld suggest me to use]
Massimo Di Stefano
[email protected]
epifanio on irc.freenode.net /join gfoss
Il giorno 25/mar/09, alle ore 16:49, Ned Deily ha scritto:
> In article <259915B3-3A8A-495D-BB47-5094A122A6CC-whZMOeQn8C0@public.gmane.org>,
> massimo di stefano <[email protected]>
> wrote:
>> i'm running python 2.5.1 on a mac osx 10.5.6 (the system pyrhon)
>> i've problems to enable spatialite extension [1]
> [..]
>> have you any suggestion on what i need to get it working on osx too ?
>> thanks a lot for any help!
>
> <http://www.gaia-gis.it/spatialite/instalMacOsX.html>
>
> --
> Ned Deily,
> [email protected]
>
> _______________________________________________
> list-pysqlite mailing list
> list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org
> http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite
--Apple-Mail-1--148186147
Content-Type: text/html;
charset=US-ASCII
Content-Transfer-Encoding: quoted-printable
<html><body style=3D"word-wrap: break-word; -webkit-nbsp-mode: space; =
-webkit-line-break: after-white-space; "><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial">Hi Ned, =
All,</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">i followed that way too, </font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial">i downloaded the bynary =
version for pysqlite osx intel</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial">i copied all the files under =
:</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">/Users/Shared/source/spatialite/</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> =
=
=
|</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> =
=
=
bin/</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> =
=
=
|</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> =
=
=
lib/</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> =
=
=
|</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> =
=
=
include/</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial">in my .bash_profile i added =
:</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><div><font class=3D"Apple-style-span"=
=
face=3D"Arial">LD_LIBRARY_PATH=3D/Users/Shared/source/spatialite/lib</font=
></div><div><font class=3D"Apple-style-span" face=3D"Arial">export =
LD_LIBRARY_PATH</font></div><div><br></div></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial">then i removed and reinstalled =
pysqlite :</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">sudo rm -rf /Library/Python/2.5/site-packages/pysqlite2 =
/Library/Python/2.5/site-packages/pysqlite-2.5.0-py2.5.egg-info</font></di=
v><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">quit terminal.app and open a new =
one,</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">rebuild pysqlite, these the log :</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><div =
style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; =
margin-left: 0px; font: normal normal normal 12px/normal 'Lucida =
Grande'; "><font class=3D"Apple-style-span" face=3D"Arial"><a =
href=3D"http://www.geofemengineering.it/pysqlite_osx_log_2.txt">http://www=
..geofemengineering.it/pysqlite_osx_log_2.txt</a></font></div></div><div><f=
ont class=3D"Apple-style-span" face=3D"Arial"><br></font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial">then in python =
:</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><div><div><font =
class=3D"Apple-style-span" face=3D"Arial">>>> from pysqlite2 import =
dbapi2 as sqlite</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">Traceback (most recent call last):</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> File "<stdin>", =
line 1, in <module></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"> File =
"/Library/Python/2.5/site-packages/pysqlite2/dbapi2.py", line 27, in =
<module></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"> from pysqlite2._sqlite import =
*</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">ImportError: =
dlopen(/Library/Python/2.5/site-packages/pysqlite2/_sqlite.so, 2): =
Symbol not found: _sqlite3_enable_load_extension</font></div><div><font =
class=3D"Apple-style-span" face=3D"Arial"> Referenced from: =
/Library/Python/2.5/site-packages/pysqlite2/_sqlite.so</font></div><div><f=
ont class=3D"Apple-style-span" face=3D"Arial"> Expected in: =
dynamic lookup</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial"><br></font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">>>> </font></div><div><br></div><div>p.s.</div><div><b=
r></div><div><div><font class=3D"Apple-style-span" face=3D"Arial">[ i =
tried also to use :</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">DYLD_LIBRARY_PATH=3D/Users/Shared/source/spatialite/lib</fo=
nt></div><div><font class=3D"Apple-style-span" face=3D"Arial">export =
DYLD_LIBRARY_PATH</font></div><div><font class=3D"Apple-style-span" =
face=3D"Arial">that seems to be what man dyld suggest me to =
use]</font></div></div><div><br></div><div><br></div></div></div><div =
apple-content-edited=3D"true"> <span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; =
white-space: normal; widows: 2; word-spacing: 0px; =
-webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: =
0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; "><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; =
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; "><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; =
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; "><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; =
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; "><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; =
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; "><span class=3D"Apple-style-span" =
style=3D"border-collapse: separate; color: rgb(0, 0, 0); font-family: =
Helvetica; font-size: 12px; font-style: normal; font-variant: normal; =
font-weight: normal; letter-spacing: normal; line-height: normal; =
orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; =
widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; =
-webkit-border-vertical-spacing: 0px; =
-webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: =
auto; -webkit-text-stroke-width: 0px; "><div style=3D"word-wrap: =
break-word; -webkit-nbsp-mode: space; -webkit-line-break: =
after-white-space; "><div>Massimo Di Stefano</div><div><a =
href=3D"mailto:[email protected]">[email protected]</a></div><=
div><br></div><div>epifanio on irc.freenode.net /join =
gfoss</div><div><br></div></div></span><div><br></div><div><br></div><div>=
<br></div></div></span></div></span></div></span></div></span><br =
class=3D"Apple-interchange-newline"></div></span><br =
class=3D"Apple-interchange-newline"> </div><br><div><div>Il giorno =
25/mar/09, alle ore 16:49, Ned Deily ha scritto:</div><br =
class=3D"Apple-interchange-newline"><blockquote type=3D"cite"><div>In =
article <<a =
href=3D"mailto:259915B3-3A8A-495D-BB47-5094A122A6CC-whZMOeQn8C0@public.gmane.org">259915B3-3A8=
[email protected]</a>>,<br> massimo di stefano <<a =
href=3D"mailto:[email protected]">[email protected]</a>> =
<br> wrote:<br><blockquote type=3D"cite">i'm running python 2.5.1 on a =
mac osx 10.5.6 (the system pyrhon)<br></blockquote><blockquote =
type=3D"cite">i've problems to enable spatialite extension =
[1]<br></blockquote>[..]<br><blockquote type=3D"cite">have you any =
suggestion on what i need to get it working on osx too =
?<br></blockquote><blockquote type=3D"cite">thanks a lot for any =
help!<br></blockquote><br><<a =
href=3D"http://www.gaia-gis.it/spatialite/instalMacOsX.html">http://www.ga=
ia-gis.it/spatialite/instalMacOsX.html</a>><br><br>-- <br> Ned =
Deily,<br> <a =
href=3D"mailto:[email protected]">[email protected]</a><br><br>_______________________=
________________________<br>list-pysqlite mailing list<br><a =
href=3D"mailto:list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org">list-pysqlite@l=
ists.itsystementwicklung.de</a><br>http://itsystementwicklung.de/cgi-bin/m=
ailman/listinfo/list-pysqlite<br></div></blockquote></div><br></body></htm=
l>=
--Apple-Mail-1--148186147--
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com
--===============0093521856==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
list-pysqlite mailing list
list-pysqlite-FR6EJeJVuqdwc357pe9rcyQmJico6nz3epZhswDD4dQ@public.gmane.org
http://itsystementwicklung.de/cgi-bin/mailman/listinfo/list-pysqlite
--===============0093521856==--
Chiacchiera con i tuoi amici in tempo reale!
http://it.yahoo.com/mail_it/foot/*http://it.messenger.yahoo.com