Installing pysqlite on Win64
Dear All, I want to install pysqlite on my Windows 64 bit machine. I have python 2.4.3 on it. Would you please let me know how can I do it? That is, I need to use the source file (i.e pysqlite-2.5.6.tar.gz) or there is an executable file to install. Thank you in advance. Regards, Navid -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing pysqlite on Win64
On Nov 20, 2010, at 12:37 PM, Navid Parvini wrote: Dear All, I want to install pysqlite on my Windows 64 bit machine. I have python 2.4.3 on it. Would you please let me know how can I do it? That is, I need to use the source file (i.e pysqlite-2.5.6.tar.gz) or there is an executable file to install. Hi Navid, I'm not a Windows guy so I really can't recommend how to proceed with the specific question you asked. But if there's any way you could upgrade the machine to Python = 2.5, your problem will go away because those versions of Python come with a built-in sqlite interface. That might be an easier approach for you. Good luck Philip -- http://mail.python.org/mailman/listinfo/python-list
Problems installing PySQLite, SQLite and Trac
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: [r...@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 [r...@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. -- http://mail.python.org/mailman/listinfo/python-list
Re: Problems installing PySQLite, SQLite and Trac
On 1 Feb, 15:48, kimwlias kimwl...@gmail.com 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: [r...@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 [r...@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. -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On Feb 28, 12:51 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 28 Feb, 12:07, Nader Emami [EMAIL PROTECTED] wrote: I am back with another problem. I suppose that I can tell it! I have installed both, 'sqlite' and 'pysqlite' without any problem. But If I try to test whether the 'pysqlite' interface works, I get the next error message: [...] /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so: undefined symbol: sqlite3_set_authorizer I don't understand it. Could you tell me how I can solve this last point? I hope so! It looks like Python (although it's really the dynamic linker) can't locate the SQLite libraries. If you have installed SQLite into a non- standard place, which I'm guessing is the case, then you will need to set your LD_LIBRARY_PATH environment variable to refer to the directory where the libraries were installed. So, if you installed SQLite into /usr/people/emami and you see files like libsqlite3.so in /usr/people/emami/lib, then you need to change your LD_LIBRARY_PATH as follows: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib (The actual directory should be the same as the one you specified for library_dirs in the setup.cfg file for pysqlite.) If you're not using bash as your shell, the syntax for the command may be different. Don't forget to add this command to your shell configuration file (eg. .bashrc) so that your system remembers this information. Paul Hello I have expanded the LD_LIBRARY_PATH to my home lib (export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib). I have built and installed the 'pysqlite-2.3.3' with the next 'setup.cfg' : [build_ext] define= include_dirs=/usr/people/emami/include library_dirs=/usr/people/emami/lib #libraries=/usr/people/emami/lib/libsqlite3.so (this line as a comment) The resutl of this process was: running install_lib copying build/lib.linux-i686-2.4/pysqlite2/_sqlite.so - /usr/people/ emami/lib/python2.4/site-packages/pysqlite2 running install_data This message had given after installing. I have controll the '/usr/ people/emami/lib/python2.4/site-packages/pysqlite2' whether the '_sqlite.so' has copied there. Yes it has. Okay! I go to python and I give the next command: from pysqlite import test and Unfortunately I get the next error message: Traceback (most recent call last): File stdin, line 1, in ? File /usr/people/emami/lib/python2.4/site-packages/pysqlite2/test/ __init__.py, line 25, in ? from pysqlite2.test import dbapi, types, userfunctions, factory, transactions,\ File /usr/people/emami/lib/python2.4/site-packages/pysqlite2/test/ dbapi.py, line 26, in ? import pysqlite2.dbapi2 as sqlite File /usr/people/emami/lib/python2.4/site-packages/pysqlite2/ dbapi2.py, line 27, in ? from pysqlite2._sqlite import * ImportError: /usr/people/emami/lib/python2.4/site-packages/pysqlite2/ _sqlite.so: undefined symbol: sqlite3_set_authorizer Do you know what option I have to give to if I want to use the 'easy_install tool? %easy_install pysqlite (with some optione with which it cab find the installed 'libsqlite.so') Nader -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On 1 Mar, 10:34, Nader [EMAIL PROTECTED] wrote: I have expanded the LD_LIBRARY_PATH to my home lib (export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib). I have built and installed the 'pysqlite-2.3.3' with the next 'setup.cfg' : [build_ext] define= include_dirs=/usr/people/emami/include library_dirs=/usr/people/emami/lib #libraries=/usr/people/emami/lib/libsqlite3.so (this line as a comment) This looks alright. Be sure to verify that libsqlite3.so is in /usr/ people/emami/lib, although I suppose you've done this, looking at your comment. The resutl of this process was: running install_lib copying build/lib.linux-i686-2.4/pysqlite2/_sqlite.so - /usr/people/ emami/lib/python2.4/site-packages/pysqlite2 running install_data This message had given after installing. I have controll the '/usr/ people/emami/lib/python2.4/site-packages/pysqlite2' whether the '_sqlite.so' has copied there. Yes it has. Okay! So pysqlite2 has installed properly at least. I go to python and I give the next command: from pysqlite import test and Unfortunately I get the next error message: [...] ImportError: /usr/people/emami/lib/python2.4/site-packages/pysqlite2/ _sqlite.so: undefined symbol: sqlite3_set_authorizer I'm running out of ideas here, but you could try doing this: ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so This should show a list of references to libraries, but if one of them is missing in some way then it means that it isn't found by the linker and it's not on the LD_LIBRARY_PATH. Another thought is that sqlite3_set_authorizer isn't found in the SQLite library - you can test this by doing the following: nm /usr/people/emami/lib/libsqlite3.so I get something like this in response: 000110b0 T sqlite3_set_authorizer If you don't get anything in response or if you see U instead of T, then this might indicate an problem with the way SQLite has been configured. Do you know what option I have to give to if I want to use the 'easy_install tool? %easy_install pysqlite (with some optione with which it cab find the installed 'libsqlite.so') I'm no easy_install expert, I'm afraid. You might want to talk to the pysqlite people directly if what I've suggested doesn't help you further: http://www.initd.org/tracker/pysqlite/wiki/pysqlite Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On Mar 1, 11:46 am, Paul Boddie [EMAIL PROTECTED] wrote: On 1 Mar, 10:34, Nader [EMAIL PROTECTED] wrote: I have expanded the LD_LIBRARY_PATH to my home lib (export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib). I have built and installed the 'pysqlite-2.3.3' with the next 'setup.cfg' : [build_ext] define= include_dirs=/usr/people/emami/include library_dirs=/usr/people/emami/lib #libraries=/usr/people/emami/lib/libsqlite3.so (this line as a comment) This looks alright. Be sure to verify that libsqlite3.so is in /usr/ people/emami/lib, although I suppose you've done this, looking at your comment. The resutl of this process was: running install_lib copying build/lib.linux-i686-2.4/pysqlite2/_sqlite.so - /usr/people/ emami/lib/python2.4/site-packages/pysqlite2 running install_data This message had given after installing. I have controll the '/usr/ people/emami/lib/python2.4/site-packages/pysqlite2' whether the '_sqlite.so' has copied there. Yes it has. Okay! So pysqlite2 has installed properly at least. I go to python and I give the next command: from pysqlite import test and Unfortunately I get the next error message: [...] ImportError: /usr/people/emami/lib/python2.4/site-packages/pysqlite2/ _sqlite.so: undefined symbol: sqlite3_set_authorizer I'm running out of ideas here, but you could try doing this: ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so This should show a list of references to libraries, but if one of them is missing in some way then it means that it isn't found by the linker and it's not on the LD_LIBRARY_PATH. Another thought is that sqlite3_set_authorizer isn't found in the SQLite library - you can test this by doing the following: nm /usr/people/emami/lib/libsqlite3.so I get something like this in response: 000110b0 T sqlite3_set_authorizer If you don't get anything in response or if you see U instead of T, then this might indicate an problem with the way SQLite has been configured. Do you know what option I have to give to if I want to use the 'easy_install tool? %easy_install pysqlite (with some optione with which it cab find the installed 'libsqlite.so') I'm no easy_install expert, I'm afraid. You might want to talk to the pysqlite people directly if what I've suggested doesn't help you further: http://www.initd.org/tracker/pysqlite/wiki/pysqlite Paul Hello ldd returens the next result: ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so linux-gate.so.1 = (0xe000) libpthread.so.0 = /lib/tls/libpthread.so.0 (0x4004) libc.so.6 = /lib/tls/libc.so.6 (0x4005) and the 'nm' gives this: nm usr/people/emami/lib/libsqlite3.so | grep sqlite3_set_authorize ce40 T sqlite3_set_authorizer /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On 1 Mar, 12:46, Nader [EMAIL PROTECTED] wrote: ldd returens the next result: ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so linux-gate.so.1 = (0xe000) libpthread.so.0 = /lib/tls/libpthread.so.0 (0x4004) libc.so.6 = /lib/tls/libc.so.6 (0x4005) I think you pasted the nm result in here, but you seem to be missing libsqlite3.so.0 (from what I see myself). From what I've just read about linux-gate.so, the linker can't seem to find the SQLite libraries. More on linux-gate.so here: http://www.trilithium.com/johan/2005/08/linux-gate/ and the 'nm' gives this: nm usr/people/emami/lib/libsqlite3.so | grep sqlite3_set_authorize ce40 T sqlite3_set_authorizer That looks alright. /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) I guess this was the end of the ldd result. I'm out of ideas, unfortunately. I think you should experiment with LD_LIBRARY_PATH and run ldd again to see if you can get it to show libsqlite3.so.0. The pysqlite mailing list might be the best place to ask for help if that doesn't work. Sorry! Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On Mar 1, 2:40 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 1 Mar, 12:46, Nader [EMAIL PROTECTED] wrote: ldd returens the next result: ldd /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so linux-gate.so.1 = (0xe000) libpthread.so.0 = /lib/tls/libpthread.so.0 (0x4004) libc.so.6 = /lib/tls/libc.so.6 (0x4005) I think you pasted the nm result in here, but you seem to be missing libsqlite3.so.0 (from what I see myself). From what I've just read about linux-gate.so, the linker can't seem to find the SQLite libraries. More on linux-gate.so here: http://www.trilithium.com/johan/2005/08/linux-gate/ and the 'nm' gives this: nm usr/people/emami/lib/libsqlite3.so | grep sqlite3_set_authorize ce40 T sqlite3_set_authorizer That looks alright. /lib/ld-linux.so.2 = /lib/ld-linux.so.2 (0x8000) I guess this was the end of the ldd result. I'm out of ideas, unfortunately. I think you should experiment with LD_LIBRARY_PATH and run ldd again to see if you can get it to show libsqlite3.so.0. The pysqlite mailing list might be the best place to ask for help if that doesn't work. Sorry! Paul Hello Paul, I have returnd to the begining and have installed everthing again. Fortunately now I have the 'pysqlite2' module, because the test.test() workd after importing of 'pysqlite2' from pysqlite2 import test test.test function test at 0x404727d4 test.test() . -- Ran 173 tests in 0.585s OK And the result of running of 'ldd' is : [EMAIL PROTECTED]:~ ldd lib/python2.4/site-packages/pysqlite2/_sqlite.so linux-gate.so.1 = (0xe000) libsqlite3.so.0 = /usr/people/emami/lib/libsqlite3.so.0 (0x4001) libpthread.so.0 = /lib/tls/libpthread.so.0 (0x40096000) libc.so.6 = /lib/tls/libc.so.6 (0x400a7000) Now I can ggo on with TurboGears! I have at home a Laptop and I have installed the 'gentoo' on it, and have no problem. But I would like to experiment with TurboGears at my work and It was a problem that I had no 'root' password. However I appreciate well your help in this case. I you like Indian or oriental music I can send you some! With regards, Nader -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
Paul Boddie wrote: On 27 Feb, 10:31, Nader Emami [EMAIL PROTECTED] wrote: 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 error message is longer than what I send here. [...] src/connection.h:33:21: sqlite3.h: No such file or directory [...] Could somebody tell me what I have to do to install 'pysqlite'? Install SQLite, perhaps? If the pysqlite build process can't find sqlite3.h then you either don't have SQLite installed, or you don't have the headers for SQLite installed. I'd recommend that you check your installed packages for the SQLite libraries (eg. libsqlite3-0 on Ubuntu) and/or the user interface (eg. sqlite3) and for the development package (eg. libsqlite3-dev). If you can't install the packages, install SQLite from source (see http://www.sqlite.org/) and try and persuade pysqlite to use your own SQLite installation - there's a setup.cfg file in the pysqlite distribution which may need to be changed to achieve this, but I don't know how that interacts with setuptools. Paul Hello, I am back with another problem. I suppose that I can tell it! I have installed both, 'sqlite' and 'pysqlite' without any problem. But If I try to test whether the 'pysqlite' interface works, I get the next error message: from pysqlite2 import dbapi2 as sqlite Traceback (most recent call last): File stdin, line 1, in ? File /usr/people/emami/lib/python2.4/site-packages/pysqlite2/dbapi2.py, line 27, in ? from pysqlite2._sqlite import * ImportError: /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so: undefined symbol: sqlite3_set_authorizer I don't understand it. Could you tell me how I can solve this last point? I hope so! With regards, Nader -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On 28 Feb, 12:07, Nader Emami [EMAIL PROTECTED] wrote: I am back with another problem. I suppose that I can tell it! I have installed both, 'sqlite' and 'pysqlite' without any problem. But If I try to test whether the 'pysqlite' interface works, I get the next error message: [...] /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so: undefined symbol: sqlite3_set_authorizer I don't understand it. Could you tell me how I can solve this last point? I hope so! It looks like Python (although it's really the dynamic linker) can't locate the SQLite libraries. If you have installed SQLite into a non- standard place, which I'm guessing is the case, then you will need to set your LD_LIBRARY_PATH environment variable to refer to the directory where the libraries were installed. So, if you installed SQLite into /usr/people/emami and you see files like libsqlite3.so in /usr/people/emami/lib, then you need to change your LD_LIBRARY_PATH as follows: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib (The actual directory should be the same as the one you specified for library_dirs in the setup.cfg file for pysqlite.) If you're not using bash as your shell, the syntax for the command may be different. Don't forget to add this command to your shell configuration file (eg. .bashrc) so that your system remembers this information. Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On Feb 28, 12:51 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 28 Feb, 12:07, Nader Emami [EMAIL PROTECTED] wrote: I am back with another problem. I suppose that I can tell it! I have installed both, 'sqlite' and 'pysqlite' without any problem. But If I try to test whether the 'pysqlite' interface works, I get the next error message: [...] /usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so: undefined symbol: sqlite3_set_authorizer I don't understand it. Could you tell me how I can solve this last point? I hope so! It looks like Python (although it's really the dynamic linker) can't locate the SQLite libraries. If you have installed SQLite into a non- standard place, which I'm guessing is the case, then you will need to set your LD_LIBRARY_PATH environment variable to refer to the directory where the libraries were installed. So, if you installed SQLite into /usr/people/emami and you see files like libsqlite3.so in /usr/people/emami/lib, then you need to change your LD_LIBRARY_PATH as follows: export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/people/emami/lib (The actual directory should be the same as the one you specified for library_dirs in the setup.cfg file for pysqlite.) If you're not using bash as your shell, the syntax for the command may be different. Don't forget to add this command to your shell configuration file (eg. .bashrc) so that your system remembers this information. Paul I see now your respond to my problem, but i can check it tomorrow because I don't have at this moment on this machine. However thank for the reaction and I will tell about it after assiging the new lib to its PATH. Nader -- http://mail.python.org/mailman/listinfo/python-list
installing pysqlite
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 error message is longer than what I send here. % easy_install pysqlite Searching for pysqlite Reading http://cheeseshop.python.org/pypi/pysqlite/ Reading http://pysqlite.org/ Reading http://cheeseshop.python.org/pypi/pysqlite/2.3.3 Best match: pysqlite 2.3.3 Downloading http://initd.org/pub/software/pysqlite/releases/2.3/2.3.3/pysqlite-2 .3.3.tar.gz Processing pysqlite-2.3.3.tar.gz Running pysqlite-2.3.3/setup.py -q bdist_egg --dist-dir /tmp/easy_install-71B-Y0 /pysqlite-2.3.3/egg-dist-tmp-Wj2VRc warning: no files found matching 'doc/*.html' In file included from src/module.c:24: src/connection.h:33:21: sqlite3.h: No such file or directory In file included from src/module.c:24: src/connection.h:38: error: parse error before sqlite3 Could somebody tell me what I have to do to install 'pysqlite'? With regards, Nader -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On 27 Feb, 10:31, Nader Emami [EMAIL PROTECTED] wrote: 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 error message is longer than what I send here. [...] src/connection.h:33:21: sqlite3.h: No such file or directory [...] Could somebody tell me what I have to do to install 'pysqlite'? Install SQLite, perhaps? If the pysqlite build process can't find sqlite3.h then you either don't have SQLite installed, or you don't have the headers for SQLite installed. I'd recommend that you check your installed packages for the SQLite libraries (eg. libsqlite3-0 on Ubuntu) and/or the user interface (eg. sqlite3) and for the development package (eg. libsqlite3-dev). If you can't install the packages, install SQLite from source (see http://www.sqlite.org/) and try and persuade pysqlite to use your own SQLite installation - there's a setup.cfg file in the pysqlite distribution which may need to be changed to achieve this, but I don't know how that interacts with setuptools. Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On Feb 27, 12:44 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 27 Feb, 10:31, Nader Emami [EMAIL PROTECTED] wrote: 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 error message is longer than what I send here. [...] src/connection.h:33:21: sqlite3.h: No such file or directory [...] Could somebody tell me what I have to do to install 'pysqlite'? Install SQLite, perhaps? If the pysqlite build process can't find sqlite3.h then you either don't have SQLite installed, or you don't have the headers for SQLite installed. I'd recommend that you check your installed packages for the SQLite libraries (eg. libsqlite3-0 on Ubuntu) and/or the user interface (eg. sqlite3) and for the development package (eg. libsqlite3-dev). If you can't install the packages, install SQLite from source (seehttp://www.sqlite.org/) and try and persuade pysqlite to use your own SQLite installation - there's a setup.cfg file in the pysqlite distribution which may need to be changed to achieve this, but I don't know how that interacts with setuptools. Paul Thank for your reaction. I don't know also how the interaction sith 'easy_install' is. I think that I have to install 'pysqlite' from source code also, because i can change ther the 'setup.cfg' file and I can give there where the 'libsqlie3' is. Nader -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
Nader wrote: On Feb 27, 12:44 pm, Paul Boddie [EMAIL PROTECTED] wrote: On 27 Feb, 10:31, Nader Emami [EMAIL PROTECTED] wrote: 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 error message is longer than what I send here. [...] src/connection.h:33:21: sqlite3.h: No such file or directory [...] Could somebody tell me what I have to do to install 'pysqlite'? Install SQLite, perhaps? If the pysqlite build process can't find sqlite3.h then you either don't have SQLite installed, or you don't have the headers for SQLite installed. I'd recommend that you check your installed packages for the SQLite libraries (eg. libsqlite3-0 on Ubuntu) and/or the user interface (eg. sqlite3) and for the development package (eg. libsqlite3-dev). If you can't install the packages, install SQLite from source (seehttp://www.sqlite.org/) and try and persuade pysqlite to use your own SQLite installation - there's a setup.cfg file in the pysqlite distribution which may need to be changed to achieve this, but I don't know how that interacts with setuptools. Paul Thank for your reaction. I don't know also how the interaction sith 'easy_install' is. I think that I have to install 'pysqlite' from source code also, because i can change ther the 'setup.cfg' file and I can give there where the 'libsqlie3' is. I think you are ok with easyinstall here. But as Paul said - you need the sqlite3-headers. Usually, these are in a package called sqlite3-dev or something. However, if you happen to have a decent distribution (read: debian-based), you should be able to install pysqlite2 as a package itself - no need to easy_install it. Diez -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On 27 Feb, 13:35, Nader [EMAIL PROTECTED] wrote: Thank for your reaction. I don't know also how the interaction sith 'easy_install' is. I think that I have to install 'pysqlite' from source code also, because i can change ther the 'setup.cfg' file and I can give there where the 'libsqlie3' is. What I did was to go to the pysqlite site (http://www.initd.org/ tracker/pysqlite/wiki/pysqlite), download the sources for the latest version, then change the setup.cfg file so that include_dirs refers to the place where the SQLite headers (eg. sqlite.h) were installed, and that library_dirs refers to the place where the SQLite libraries were installed. For example: include_dirs=/opt/sqlite/usr/include library_dirs=/opt/sqlite/usr/lib (You'd get the above if you configured SQLite to install into /opt/ sqlite/usr.) Then, just do the usual build: python setup.py build And install with a prefix: python setup.py install --prefix=/opt/pysqlite/usr Since you seem to be installing things in non-root-controlled places, I imagine you're familiar with specifying things like the --prefix above, as well as setting up your PYTHONPATH afterwards. Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
Paul Boddie wrote: On 27 Feb, 13:35, Nader [EMAIL PROTECTED] wrote: Thank for your reaction. I don't know also how the interaction sith 'easy_install' is. I think that I have to install 'pysqlite' from source code also, because i can change ther the 'setup.cfg' file and I can give there where the 'libsqlie3' is. What I did was to go to the pysqlite site (http://www.initd.org/ tracker/pysqlite/wiki/pysqlite), download the sources for the latest version, then change the setup.cfg file so that include_dirs refers to the place where the SQLite headers (eg. sqlite.h) were installed, and that library_dirs refers to the place where the SQLite libraries were installed. For example: include_dirs=/opt/sqlite/usr/include library_dirs=/opt/sqlite/usr/lib (You'd get the above if you configured SQLite to install into /opt/ sqlite/usr.) Then, just do the usual build: python setup.py build And install with a prefix: python setup.py install --prefix=/opt/pysqlite/usr Since you seem to be installing things in non-root-controlled places, I imagine you're familiar with specifying things like the --prefix above, as well as setting up your PYTHONPATH afterwards. Paul I have first installed sqlite and then I have configure the setup.cfg file of pysqlite package. I had to do two things in 'pysqlite' directory: 1- python setup.py build 2- python setup.py install It has done without any error. I suppose that the installation is well done, but I haven't yet test whether I can import the 'pysqlite' module in python. But how you mean about PYTHONPATH? If I do echo $PYTHONPAT i get an empty string. That meant that I don't have any PYTHONPATH. How can I assign a correct path to this variable? Nader -- http://mail.python.org/mailman/listinfo/python-list
Re: installing pysqlite
On 27 Feb, 16:34, Nader Emami [EMAIL PROTECTED] wrote: I have first installed sqlite and then I have configure the setup.cfg file of pysqlite package. I had to do two things in 'pysqlite' directory: 1- python setup.py build 2- python setup.py install It has done without any error. I suppose that the installation is well done, but I haven't yet test whether I can import the 'pysqlite' module in python. But how you mean about PYTHONPATH? If I do echo $PYTHONPAT i get an empty string. That meant that I don't have any PYTHONPATH. How can I assign a correct path to this variable? I was getting ahead of myself and forgot that you may have a version of Python that you installed yourself from source. If so, python setup.py install (without specifying --prefix) should put the package in the right place so that you don't have to worry about PYTHONPATH. Just try and import pysqlite2, then see if it worked or not. Paul -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing PySQLite on OS X 10.4
Cheers. I should have read the installation notes more carefully :) Rob C -- http://mail.python.org/mailman/listinfo/python-list
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 -- http://mail.python.org/mailman/listinfo/python-list
Re: Installing PySQLite on OS X 10.4
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
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
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
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
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