pygresql

J

JD

Hi there.

I'm trying to use python with postgresql. I decided to use psycopg to
interact with the postgresql server. When installing psycopg it
appeared that I needed mxDateTime. So I decided to install the mxbase
package.

I received the following error message (the interesting bit seems to
be at the end):


james@ubuntu-server:/var/lib/postgresql/mxbase$ sudo python setup.py
install
running install
running build
running mx_autoconf
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-
prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/local/include -I/usr/include -
c _configtest.c -o _configtest.o
_configtest.c: In function 'main':
_configtest.c:4: warning: statement with no effect
gcc -pthread _configtest.o -L/usr/local/lib -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-
prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/include/python2.5 -I/usr/local/
include -I/usr/include -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
macros to define: [('HAVE_STRPTIME', '1')]
macros to undefine: []
running build_ext

building extension "mx.DateTime.mxDateTime.mxDateTime" (required)
building 'mx.DateTime.mxDateTime.mxDateTime' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-
prototypes -fPIC -DUSE_FAST_GETCURRENTTIME -DHAVE_STRPTIME=1 -Imx/
DateTime/mxDateTime -I/usr/include/python2.5 -I/usr/local/include -I/
usr/include -c mx/DateTime/mxDateTime/mxDateTime.c -o build/temp.linux-
i686-2.5_ucs4/mx-DateTime-mxDateTime-mxDateTime/mx/DateTime/mxDateTime/
mxDateTime.o
gcc: mx/DateTime/mxDateTime/mxDateTime.c: No such file or directory
gcc: no input files
error: command 'gcc' failed with exit status 1


I googled "error: command 'gcc' failed with exit status 1" and
interestingly a lot of the results seemed to be linked with python. I
can confirm that I do have gcc installed. One post seemed to suggest
that I may be using too new a version of gcc. Do you think this is the
problem or am I going astray somewhere else?

Thank you very much in advance for any assistance,
James.
 
J

JD

Btw apologies for naming the post 'pygresql'! That was the module I
was attempting to use before.
 
J

JD

Apologies for essentially talking to myself out loud!

I've switched back to pygresql. I think a lot of my problems were
caused by not having installed postgresql-server-dev-8.2 which
contains a lot of header files etc. I'm sure this was part of the
problem with the psycopg modules aswell.

postgresql-server-dev can easily be installed of course by using:

sudo apt-get install postgresql-server-dev

I hope my ramblings have been of help to someone!
 
R

rustom

Hi there.

I'm trying to use python with postgresql. I decided to use psycopg to
interact with the postgresql server. When installing psycopg it
appeared that I needed mxDateTime. So I decided to install the mxbase
package.

I received the following error message (the interesting bit seems to
be at the end):
snipped

Thank you very much in advance for any assistance,
James.

Why are you trying to install yourself instead of using apt? On my
debian etch box the psycopg packages have dependencies to the python-
egenix-mx* packages and installing psycopg pulls in the others without
problems. And I guess ubuntu should be similar.
 
E

Erik Jones

Hi there.

I'm trying to use python with postgresql. I decided to use psycopg to
interact with the postgresql server. When installing psycopg it
appeared that I needed mxDateTime. So I decided to install the mxbase
package.

I received the following error message (the interesting bit seems to
be at the end):


james@ubuntu-server:/var/lib/postgresql/mxbase$ sudo python setup.py
install
running install
running build
running mx_autoconf
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-
prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/local/include -I/usr/include -
c _configtest.c -o _configtest.o
_configtest.c: In function 'main':
_configtest.c:4: warning: statement with no effect
gcc -pthread _configtest.o -L/usr/local/lib -o _configtest
success!
removing: _configtest.c _configtest.o _configtest
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-
prototypes -fPIC -D_GNU_SOURCE=1 -I/usr/include/python2.5 -I/usr/
local/
include -I/usr/include -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
macros to define: [('HAVE_STRPTIME', '1')]
macros to undefine: []
running build_ext

building extension "mx.DateTime.mxDateTime.mxDateTime" (required)
building 'mx.DateTime.mxDateTime.mxDateTime' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -O2 -Wall -Wstrict-
prototypes -fPIC -DUSE_FAST_GETCURRENTTIME -DHAVE_STRPTIME=1 -Imx/
DateTime/mxDateTime -I/usr/include/python2.5 -I/usr/local/include -I/
usr/include -c mx/DateTime/mxDateTime/mxDateTime.c -o build/
temp.linux-
i686-2.5_ucs4/mx-DateTime-mxDateTime-mxDateTime/mx/DateTime/
mxDateTime/
mxDateTime.o
gcc: mx/DateTime/mxDateTime/mxDateTime.c: No such file or directory
gcc: no input files
error: command 'gcc' failed with exit status 1


I googled "error: command 'gcc' failed with exit status 1" and
interestingly a lot of the results seemed to be linked with python. I
can confirm that I do have gcc installed. One post seemed to suggest
that I may be using too new a version of gcc. Do you think this is the
problem or am I going astray somewhere else?

Thank you very much in advance for any assistance,
James.

You shouldn't be using psycopg, it's not supported anymore. Use
psycopg2 which is in active development and has no dependecies on any
of the mx libraries.

Erik Jones

Software Developer | Emma®
(e-mail address removed)
800.595.4401 or 615.292.5888
615.292.0777 (fax)

Emma helps organizations everywhere communicate & market in style.
Visit us online at http://www.myemma.com
 
N

Nikita the Spider

JD said:
Hi there.

I'm trying to use python with postgresql. I decided to use psycopg to
interact with the postgresql server. When installing psycopg it
appeared that I needed mxDateTime. So I decided to install the mxbase
package.

I see that you've already solved your problem, but I'll add that
psycopg2 will use mxDateTime if it is installed, but it isn't required.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top