[Python] pb compilazione psycopg2 in virtualenv macchina Amazon

Alessandro Dentella sandro a e-den.it
Lun 12 Mar 2012 13:38:54 CET


Ciao,


sto avendo problemi a compilare psycopg2 su una macchina virtuale Amazon
10.04.

(test)root a waonline:/tmp/test(AWS)# dpkg -l postgresq\* libpq\*|awk '/ii/ {print $1,  $2}'

  ii libpq-dev
  ii libpq5
  ii postgresql
  ii postgresql-8.4
  ii postgresql-client-8.4
  ii postgresql-client-common
  ii postgresql-common
  ii postgresql-contrib
  ii postgresql-contrib-8.4
  ii postgresql-server-dev-8.4

# virtualenv --no-site-packages test
# cd test ; . bin/activate; pip install psycopg2

termina male, come riportato sotto (log completi:
http://pastebin.com/5JtTDcxb) 


Avete suggerimenti?


sandro
*:-)



psycopg/psycopgmodule.c:876: error: ‘PyType_GenericAlloc’ undeclared (first use in this function)

error: command 'gcc' failed with exit status 1

----------------------------------------

Command /tmp/test/bin/python -c "import setuptools;__file__='/tmp/test/build/psycopg2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-e47Q6j-record/install-record.txt --install-headers /tmp/test/include/site/python2.6 failed with error code 1 in /tmp/test/build/psycopg2

Exception information:
Traceback (most recent call last):
  File "/tmp/test/lib/python2.6/site-packages/pip-1.1-py2.6.egg/pip/basecommand.py", line 104, in main
    status = self.run(options, args)
  File "/tmp/test/lib/python2.6/site-packages/pip-1.1-py2.6.egg/pip/commands/install.py", line 250, in run
    requirement_set.install(install_options, global_options)
  File "/tmp/test/lib/python2.6/site-packages/pip-1.1-py2.6.egg/pip/req.py", line 1133, in install
    requirement.install(install_options, global_options)
  File "/tmp/test/lib/python2.6/site-packages/pip-1.1-py2.6.egg/pip/req.py", line 577, in install
    cwd=self.source_dir, filter_stdout=self._filter_install, show_stdout=False)
  File "/tmp/test/lib/python2.6/site-packages/pip-1.1-py2.6.egg/pip/__init__.py", line 256, in call_subprocess
    % (command_desc, proc.returncode, cwd))
InstallationError: Command /tmp/test/bin/python -c "import setuptools;__file__='/tmp/test/build/psycopg2/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-e47Q6j-record/install-record.txt --install-headers /tmp/test/include/site/python2.6 failed with error code 1 in /tmp/test/build/psycopg2


Maggiori informazioni sulla lista Python