Sorry for this basic question. I am new to this and I have been pulling my hair out.
Environment:
- Python2.7.3 + Django 1.4 + PostgreSQL 9.2.
- OSX 10.8.2 + Xcode 4.5.1
Error:
I tried to install psycopg2 in different ways: from source, easy_install and pip. I always get the same error: unable to execute gcc-4.0: No such file or directory + error: command 'gcc-4.0' failed with exit status 1
I first did not have gcc installed so downloaded Xcode and the related developer tools. Now I have gcc-4.2. This is the version: i686-apple-darwin11-llvm-gcc-4.2 (GCC) 4.2.1
BUT psycopg2 keeps insisting on gcc-4.0, but I (now) have 4.2. At the same time, I have noticed from other Stackoverflow posts that it is possible to compile psycopg2 using gcc-4.2. And I'd rather not do one of these unsupported hacks involving Xcode3 in order to access Gcc-4.0.
My question:
Can I specify to use gcc-4.2, instead of gcc-4.0 somehow when installing psycopg2? Django + PostgreSQL are very commonly used so surely there must be a simple way to solve this? Many thanks!!