Mac osx Django PIL 错误 / usr/bin/cc 重新安装时出现文件错误

发布于 2024-11-27 06:40:04 字数 592 浏览 4 评论 0原文

我在 django 表单图像上传中遇到了著名的 The _imaging C module is not Installed 错误。我正在尝试解决许多重新安装问题,但每次我尝试使用 pip install 或 brew install 安装 pil 时,我都会在 /usr/bin/cc 处收到目录未找到错误。

以前有人遇到过这个吗?有什么提示可以让我朝着正确的方向前进吗?我正在虚拟环境中运行一切,并希望继续这样做。

谢谢!! CG

编辑:

安装 Xcode 解决了我的问题,我现在收到以下错误:

WARNING: '' not a valid package name; please use only.-separated package names in setup.py
--- using frameworks at /System/Library/Frameworks
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

I am getting the ever famous The _imaging C module is not installed error with a django form Image upload. I am trying to work through the many re-install tuts out there but every time I try to install pil with either pip install or brew install I get a directory not found error at /usr/bin/cc.

Has anyone ran into this before? Any hints to get me moving in the right direction? I am running everything in a virtual enviroment and would like to continue to do so.

Thanks!!
CG

EDIT:

Installing Xcode fixed my problem, I am now getting the following error:

WARNING: '' not a valid package name; please use only.-separated package names in setup.py
--- using frameworks at /System/Library/Frameworks
unable to execute gcc-4.0: No such file or directory
error: Setup script exited with error: command 'gcc-4.0' failed with exit status 1

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

深海少女心 2024-12-04 06:40:04

确定完全安装了开发者工具吗?在 Mac OS X 10.7 Lion 上,当您从 Mac App Store 获取 Xcode 4.1 时,它会将安装程序下载到 /Applications 中。然后您必须手动运行该安装程序。这将添加 /usr/bin/cc 和其他工具的预期链接。

Are you sure you totally installed the Developer Tools? On Mac OS X 10.7 Lion, when you get Xcode 4.1 from the Mac App Store, it downloads an installer into /Applications. You then have to manually run that installer. That will add the expected links for /usr/bin/cc and other tools.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文