pygresql

Erik Jones erik at myemma.com
Sun Nov 4 21:08:21 CET 2007


On Nov 4, 2007, at 9:45 AM, JD wrote:

> 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 at 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®
erik at myemma.com
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





More information about the Python-list mailing list