pip安装失败,并带有/usr/bin/clang:没有这样的文件或目录 [英] pip install fails with /usr/bin/clang: No such file or directory

查看:150
本文介绍了pip安装失败,并带有/usr/bin/clang:没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将自己的开发环境迁移到10.8,但是pip出现了问题.

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

具体地说,我使用的是virtualenvs/virtualwrapper,但不能使用pip install psycopg2,在构建psycopg2._psycopg扩展程序时,我得到:

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?

推荐答案

之所以会发生这种情况,是因为升级后您没有重新安装命令行工具.

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

通常,应该将XCode升级到最新版本(4.4)(我相信,当我更新到10.8时,我还更新了一堆其他应用程序,包括XCode).更新后,您需要重新安装命令行工具.现在,可以通过XCode中的设置来完成此操作:

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.

这篇关于pip安装失败,并带有/usr/bin/clang:没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆