1

First of all, I am sorry for asking a question that was asked million times, however, I couldn't resolve my issue.

TL;DR:
psycopg2 builds in Python3.4 virtualenv, but not in Python3.2; suspected dev packages missing, where can I get dev packages for old python releases?

Long story:
I should be writing code for Python3.2 using django with PostgreSQL database engine.

Ubuntu 15.04 by default ships with Python3.4 so I have build Python3.2 from source:

$ python3.2 --version
Python 3.2.6

virtualenv is created so:

myproject $ virtualenv -p python3.2 venv
New python executable in venv/bin/python3.2
Also creating executable in venv/bin/python
Installing setuptools, pip...done.

Installing requirements:

myproject $ source venv/bin/activate
(venv)myproject $ pip install psycopg2

The output log can be found in pastebin.

What I have read there:

  • GCC finishes whatever its doing without error messages; last non-error reporting line is

running install_lib

  • then it fails with

Command /home/julka/LP/myproject/venv/bin/python3.2 -c "import setuptools, tokenize;__file__='/tmp/pip-build-cbu7a3/psycopg2/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-cyu65o-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/julka/LP/myproject/venv/include/site/python3.2 failed with error code 1 in /tmp/pip-build-cbu7a3/psycopg2

where it was compiling some lib.

Building with Python3.4

julka@Pyragas-vo2:~/L1P/myproject$ virtualenv -p python3.4 venv
Running virtualenv with interpreter /usr/bin/python3.4
Using base prefix '/usr'
New python executable in venv/bin/python3.4
Also creating executable in venv/bin/python
Installing setuptools, pip...done.
julka@Pyragas-vo2:~/LP/myproject$ source venv/bin/activate
(venv)julka@Pyragas-vo2:~/LP/myproject$ pip install psycopg2 --vv > psycopg2.log
Successfully installed psycopg2
Cleaning up...
(venv)julka@Pyragas-vo2:~/LP/myproject$ 

Successful installation. I have put the log in pastebin.

Maybe I'm missing some kind of development files for python3.2, what do i need to check this out?

julka
  • 1,172
  • 2
  • 13
  • 29
  • The output logs in /tmp/pip-build-cbu7a3/psycopg2 will be useful for debugging this issue. Could you please add it to your question? – musically_ut Jun 01 '15 at 12:25
  • `ls /tmp` outputs the same before and after `pip install psycopg2` with any virtualenv activated and none of the entries resembles log. There are `pip_delete_this_directory.txt` though. – julka Jun 01 '15 at 13:18

0 Answers0