473,773 Members | 2,306 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How to build the pysqlite? Where to find the "sqlite3.h" ?

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
do not have the "sqlite3.h" there.

Thinks becomes even more complicated since I have no permissions to
write to the 2 above mentioned directories? So, do I have any chance
to install the pysqlite? If yes, what should I do?

Should I find the file on the web and put in in some of my directories
and then to change the path in the "setup.cfg" ?

Thank you for any help.
Nov 5 '08 #1
15 14782
On Nov 5, 6:47*am, Kurda Yon <kurda...@yahoo .comwrote:
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.
You can try downloading sqlite3 from the web and installing it in a
local dir. Update pysqlite setup.cfg to add these local dir names and
then try building it.

-srp

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
do not have the "sqlite3.h" there.

Thinks becomes even more complicated since I have no permissions to
write to the 2 above mentioned directories? So, do I have any chance
to install the pysqlite? If yes, what should I do?

Should I find the file on the web and put in in some of my directories
and then to change the path in the "setup.cfg" ?

Thank you for any help.
Nov 5 '08 #2
On Nov 4, 8:59 pm, "saju.pil...@gm ail.com" <saju.pil...@gm ail.com>
wrote:
On Nov 5, 6:47 am, Kurda Yon <kurda...@yahoo .comwrote:
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.

You can try downloading sqlite3 from the web and installing it in a
local dir. Update pysqlite setup.cfg to add these local dir names and
then try building it.

-srp
I see the problem. The pysqlite is a package which allows a
communication between the python and sqlite. I try to install the
"pysqlite" but I do not have the "sqlite" on my computer. So, I have
the problem. I tried to find out how to install the sqlite3 but it
seems there are no simple and clear explanations of how to do it. So,
I think I will give up and search for an easier way. Tank you for your
help.
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
do not have the "sqlite3.h" there.
Thinks becomes even more complicated since I have no permissions to
write to the 2 above mentioned directories? So, do I have any chance
to install the pysqlite? If yes, what should I do?
Should I find the file on the web and put in in some of my directories
and then to change the path in the "setup.cfg" ?
Thank you for any help.
Nov 5 '08 #3

Hi Kurda,

I have been through this problem. Somebody needs to write a FAQ.

Took me a few days to pinpoint the problem.

Don't know which platform but I assume Linux...

Python depends upon Sqlite... which is weird... but it is what I discovered....

When Python is being built.. it checks for sqlite3.h.. in it's
'configure' script. If it is not there it doesn't provide any support
for it.

Other databases go 'ontop' of the language... so once you install your
compiler/interpretor, you install your database. That is my experience.

Anyway, it is the other way around with sqlite. Install sqlite.. then
build python... then it will all work.....

The trick is having sqlite installed before the 'make configure' step
in the install process.

If you have sophisticated packaging system in your linux... then use that...

Regards

David

Quoting Kurda Yon <ku******@yahoo .com>:
On Nov 4, 8:59 pm, "saju.pil...@gm ail.com" <saju.pil...@gm ail.com>
wrote:
>On Nov 5, 6:47 am, Kurda Yon <kurda...@yahoo .comwrote:
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.

You can try downloading sqlite3 from the web and installing it in a
local dir. Update pysqlite setup.cfg to add these local dir names and
then try building it.

-srp

I see the problem. The pysqlite is a package which allows a
communication between the python and sqlite. I try to install the
"pysqlite" but I do not have the "sqlite" on my computer. So, I have
the problem. I tried to find out how to install the sqlite3 but it
seems there are no simple and clear explanations of how to do it. So,
I think I will give up and search for an easier way. Tank you for your
help.
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
do not have the "sqlite3.h" there.
Thinks becomes even more complicated since I have no permissions to
write to the 2 above mentioned directories? So, do I have any chance
to install the pysqlite? If yes, what should I do?
Should I find the file on the web and put in in some of my directories
and then to change the path in the "setup.cfg" ?
Thank you for any help.

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


Nov 5 '08 #4
On Nov 5, 12:29*pm, Dennis Lee Bieber <wlfr...@ix.net com.comwrote:
On Tue, 04 Nov 2008 21:58:17 -0500, david.l...@prei sshare.net declaimed
the following in comp.lang.pytho n:
>
Python depends upon Sqlite... which is weird... but it is what I discovered...

* * * * Not really (weird). Python, as of 2.5, includes the PySQLite DB-API
adapter as part of the native library/source code. BUT SQLite is NOT
part of Python (the Windows installers typically include the SQLite
engine as a convenience, but Linux installers expect the engine to
already be available).

To clarify further. sqlite is supported in python by providing python
language bindings over the sqlite *native* apis. SQLite is written in
C; pysqlite uses the SQLite C api and intelligently glues it into the
python interpreter and makes python language apis available to you.
This is why Python (pysqlite2 rather) depends on the native SQLite
libraries

This is usually how any new functionality would be made available in
python - by writing python wrappers over the existing native
libraries. The other method would be to re-implement the complete
functionality in pure python (an eg of this technique would be
paramiko which implements SSH2 in pure python)

-srp
>
* * * * None of the other database adapters are part of the base library.
--
* * * * Wulfraed * * * *Dennis Lee Bieber * * * ** * * KD6MOG
* * * * wlfr...@ix.netc om.com * * * * * * *wulfr...@besti aria.com
* * * * * * * * HTTP://wlfraed.home.netcom.com/
* * * * (Bestiaria Support Staff: * * * * * * * web-a...@bestiaria. com)
* * * * * * * * HTTP://www.bestiaria.com/
Nov 5 '08 #5
This is all useful and interesting stuff, but I don't think any of it
addresses the original poster's problem, which is that he has no root
access to a Linux or Unix box, and wants to get pysqlite2 working in
his home directory. I have exactly the same problem. I have tried the
"python setup.py install --home=~" method, and I get errors from GCC
that I have no permissions (and to be honest, nor the knowledge) to
overcome.

Isn't there anyway to get a Linux binary that can just be put
somewhere in the Python path so we can use sqlite? Or are those of us
without admin/root control of our boxes screwed?
Nov 5 '08 #6
On Nov 5, 9:22*pm, "Shawn Milochik" <Sh...@milochik .comwrote:
This is all useful and interesting stuff, but I don't think any of it
addresses the original poster's problem, which is that he has no root
access to a Linux or Unix box, and wants to get pysqlite2 working in
his home directory. I have exactly the same problem. I have tried the
"python setup.py install --home=~" method, and I get errors from GCC
that I have no permissions (and to be honest, nor the knowledge) to
overcome.

Isn't there anyway to get a Linux binary that can just be put
somewhere in the Python path so we can use sqlite? Or are those of us
without admin/root control of our boxes screwed?
1. Get sqlite3 from http://www.sqlite.org/sqlite-3.6.4.tar.gz
2. build and install sqlite3 (./configure --prefix=/any/writeable/dir
&& make install) -- you may want to supply the --disable-tcl flag if
you hit permission problems
3. get pysqlite3, edit setup.cfg libraries and include lines to point
to the lib/ and include/ dir where you installed sqlite3 in the
previous step
4. python setup.py install --home=somewhere
5. PYTHONPATH=some where ./python -- import pysqlite2 should work for
you
Nov 5 '08 #7
On Wed, Nov 5, 2008 at 11:58 AM, sa*********@gma il.com
<sa*********@gm ail.comwrote:
On Nov 5, 9:22 pm, "Shawn Milochik" <Sh...@milochik .comwrote:
>This is all useful and interesting stuff, but I don't think any of it
addresses the original poster's problem, which is that he has no root
access to a Linux or Unix box, and wants to get pysqlite2 working in
his home directory. I have exactly the same problem. I have tried the
"python setup.py install --home=~" method, and I get errors from GCC
that I have no permissions (and to be honest, nor the knowledge) to
overcome.

Isn't there anyway to get a Linux binary that can just be put
somewhere in the Python path so we can use sqlite? Or are those of us
without admin/root control of our boxes screwed?

1. Get sqlite3 from http://www.sqlite.org/sqlite-3.6.4.tar.gz
2. build and install sqlite3 (./configure --prefix=/any/writeable/dir
&& make install) -- you may want to supply the --disable-tcl flag if
you hit permission problems
3. get pysqlite3, edit setup.cfg libraries and include lines to point
to the lib/ and include/ dir where you installed sqlite3 in the
previous step
4. python setup.py install --home=somewhere
5. PYTHONPATH=some where ./python -- import pysqlite2 should work for
you
--

Thanks, but either I'm missing something or you're missing something.
I can't do any of what you describe on the machine I want to use
sqlite on.

I have downloaded the binary sqlite3 file from sqlite's Web site, and
I can use it with shell scripts and via the command line with no
problem. The issue is that I don't seem to have any way available to
me to use the pysqlite2 Python module.

When I try the "python setup.py --install --home=somewhere"
installation, it blows up on GCC errors that I do not have the
permissions to even attempt to fix. What I was asking above was
whether there was a way do download the pysqlite2 module as files that
I can just copy into a directory that Python thinks is part of its
path so I can use it without having to compile or build it in any way
on that machine.

Thanks,
Shawn
Nov 5 '08 #8
On Nov 5, 10:07*pm, "Shawn Milochik" <Sh...@milochik .comwrote:
On Wed, Nov 5, 2008 at 11:58 AM, saju.pil...@gma il.com

<saju.pil...@gm ail.comwrote:
On Nov 5, 9:22 pm, "Shawn Milochik" <Sh...@milochik .comwrote:
This is all useful and interesting stuff, but I don't think any of it
addresses the original poster's problem, which is that he has no root
access to a Linux or Unix box, and wants to get pysqlite2 working in
his home directory. I have exactly the same problem. I have tried the
"python setup.py install --home=~" method, and I get errors from GCC
that I have no permissions (and to be honest, nor the knowledge) to
overcome.
Isn't there anyway to get a Linux binary that can just be put
somewhere in the Python path so we can use sqlite? Or are those of us
without admin/root control of our boxes screwed?
1. Get sqlite3 fromhttp://www.sqlite.org/sqlite-3.6.4.tar.gz
2. build and install sqlite3 (./configure --prefix=/any/writeable/dir
&& make install) -- you may want to supply the --disable-tcl flag if
you hit permission problems
3. get pysqlite3, edit setup.cfg libraries and include lines to point
to the lib/ and include/ dir where you installed sqlite3 in the
previous step
4. python setup.py install --home=somewhere
5. PYTHONPATH=some where ./python -- import pysqlite2 should work for
you
--

Thanks, but either I'm missing something or you're missing something.
I can't do any of what you describe on the machine I want to use
sqlite on.

I have downloaded the binary sqlite3 file from sqlite's Web site, and
The linux binary will not work. You need the headers and the
libraries. Grab the src tar ball and build and install locally.

-srp
I can use it with shell scripts and via the command line with no
problem. The issue is that I don't seem to have any way available to
me to use the pysqlite2 Python module.

When I try the "python setup.py --install --home=somewhere"
installation, it blows up on GCC errors that I do not have the
permissions to even attempt to fix. *What I was asking above was
whether there was a way do download the pysqlite2 module as files that
I can just copy into a directory that Python thinks is part of its
path so I can use it without having to compile or build it in any way
on that machine.

Thanks,
Shawn
Nov 5 '08 #9
>Thanks, but either I'm missing something or you're missing something.
>I can't do any of what you describe on the machine I want to use
sqlite on.

I have downloaded the binary sqlite3 file from sqlite's Web site, and

The linux binary will not work. You need the headers and the
libraries. Grab the src tar ball and build and install locally.

-srp
That is not correct. The binary *does* work, as I said last time.

For the third time, it is not possible for me to build from source on that box.

And in any case, you keep talking about sqlite3, but I'm talking about
pysqlite2.
Nov 5 '08 #10

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

Similar topics

1
1436
by: Brad Burke | last post by:
When I 'build' my Windows Application solution, it created three files in the "bin" directory. How do I change the name of the .exe it creates in the bin directory? -- Brad Burke FusionData, LLC 970 222-1501
2
10009
by: Keith Smith | last post by:
What is the difference between "build" and "rebuild" when building a project?
4
10381
by: Simon Verona | last post by:
I'm looking to build a "kiosk" style of application in vb.net (using winforms)... Writing the application itself is no problem. What I want to do though is have the PC set so that the application runs automatically on system startup - is completely modal - no alt-tab's allowed. I don't want to have the start button or even want the "explorer" item running at all. I want my application to be the only thing running.
0
1291
by: Diffident | last post by:
Hello All, I am trying to do a "build" of all files of my web app on my local machine. I know that there is an "aspnet_wp.exe" running forever on my machine and to my knowledge each web app is hosted in its own AppDomain. Now when I do a build on my local machine is this AppDomain unloaded? If yes, why does it have to be unloaded? Cannot it drain stop the current AppDomain and spawn a new AppDomain with the new assembly. Please refer to...
0
1379
by: Ubergeek | last post by:
I noticed this bug ever since I installed VC7.1 on the same machine as VC6. Sometimes when I am working with VC6, when I do a build, after the build finishes, the various menu items/toolbars remain disabled and I cant do another build - or even quit VC. Everytime I try to quit, I am informed that I cannot Exit whilst a build is in progress, and that I have stop the build first. As I said before, the stop build button has no effect. Has...
8
2173
by: Bruce | last post by:
I am using VB in Vs2005. Am I missing something or does VB not have the concept of "builds" (release/debug) like in VC? I wrote an assembly and I would like to have a debug version of the DLL and a release version of the DLL. I would like to create some sample code that demonstrates my assembly in VB and would like to have two builds, one using my debug version and the other using the release version of the assembly. How can I do...
14
7157
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 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/
0
1118
by: =?Utf-8?B?d2lubGlu?= | last post by:
Hello Using VS 2005 and VB.net In Solution Explorer amongst other things there can be: 1)a project with forms 2)Class libraries 3)user controls 4)the solution itself
0
9454
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10106
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9914
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
8937
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...
1
7463
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5355
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
5484
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3610
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2852
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.