Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip install fails with /usr/bin/clang: No such file or directory

I am migrating my dev environment to 10.8, however I am having issues with pip.

Specifically, I'm using a virtualenvs/virtualwrapper but cannot pip install psycopg2, and during the building of the psycopg2._psycopg extension, I get:

unable to execute /usr/bin/clang: No such file or directory
error: command '/usr/bin/clang' failed with exit status 1

Can anyone offer a solution to this?

like image 315
Monolith Avatar asked Aug 03 '12 08:08

Monolith


1 Answers

This probably happens because you did not re-install the Command Line Tools after upgrading.

Usually XCode should be upgraded to the latest version (4.4) (I believe when I updated to 10.8 I also updated a whole bunch of other applications, including XCode). After the update you need to re-install the Command Line Tools. This can now be done via a setting in XCode:

Go to "Preferences -> Downloads" and install "Command Line Tools".

Now you should have no more problems when installing packages that need to be compiled.

like image 128
mbrochh Avatar answered Oct 19 '22 00:10

mbrochh