473,883 Members | 1,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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/pysqli...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
Feb 27 '07 #1
14 7166
On 27 Feb, 10:31, Nader Emami <e...@knmi.nlwr ote:
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

Feb 27 '07 #2
On Feb 27, 12:44 pm, "Paul Boddie" <p...@boddie.or g.ukwrote:
On 27 Feb, 10:31, Nader Emami <e...@knmi.nlwr ote:
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

Feb 27 '07 #3
Nader wrote:
On Feb 27, 12:44 pm, "Paul Boddie" <p...@boddie.or g.ukwrote:
>On 27 Feb, 10:31, Nader Emami <e...@knmi.nlwr ote:
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
Feb 27 '07 #4
On 27 Feb, 13:35, "Nader" <n.em...@gmail. comwrote:
>
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

Feb 27 '07 #5
Paul Boddie wrote:
On 27 Feb, 13:35, "Nader" <n.em...@gmail. comwrote:
>Thank for your reaction. I don't know also how the interaction sith
'easy_instal l' 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
Feb 27 '07 #6
On 27 Feb, 16:34, Nader Emami <e...@knmi.nlwr ote:
>
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

Feb 27 '07 #7
Paul Boddie wrote:
On 27 Feb, 10:31, Nader Emami <e...@knmi.nlwr ote:
>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_instal l' 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._sqli te import *
ImportError:
/usr/people/emami/lib/python2.4/site-packages/pysqlite2/_sqlite.so:
undefined symbol: sqlite3_set_aut horizer

I don't understand it. Could you tell me how I can solve this last
point? I hope so!

With regards,

Nader
Feb 28 '07 #8
On 28 Feb, 12:07, Nader Emami <e...@knmi.nlwr ote:
>
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_aut horizer

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_P ATH}:/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

Feb 28 '07 #9
On Feb 28, 12:51 pm, "Paul Boddie" <p...@boddie.or g.ukwrote:
On 28 Feb, 12:07, Nader Emami <e...@knmi.nlwr ote:
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_aut horizer
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_P ATH}:/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

Feb 28 '07 #10

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

Similar topics

4
2337
by: saniac | last post by:
I am working on a little project using pysqlite. It's going to be exposed on the web, so I want to make sure I quote all incoming data correctly. However, I've run into a brick wall trying to use parameters to populate a query of the form "select * where col1 in ( ? )" The naive approach doesn't work: values= sql = """select * where value in (?)""" cu = cx.cursor()
0
1442
by: No.23 | last post by:
#!/usr/bin/env python import libgmail from time import gmtime, strftime fp = open('/tmp/python.list', 'w') ga = libgmail.GmailAccount("No.0023@gmail.com", "mypass") ga.login() result = self.ga.getMessagesByLabel('python.list', True)
92
4013
by: ureuffyrtu955 | last post by:
Python is a good programming language, but "Python" is not a good name. First, python also means snake, Monty Python. If we search "python" in google, emule, many results are not programming resource. If we search PHP, all results are programming resource. Second, python also means snake, snake is not a good thing in western culture. Many people dislike any things relevant to snake. We must have high regard for the custom.
15
14839
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 directory". So, I assume that the absence of the "sqlite3.h" is the origin of the problem. I found on the web, that this file should be either in "/usr/local/ include" or in "/usr/local/lib". I check this directories and I really
0
11151
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10858
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10419
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9577
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5804
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5996
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4619
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4225
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3237
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.