我在 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
最佳答案
您确定完全安装了开发人员工具吗?在 Mac OS X 10.7 Lion 上,当您从 Mac App Store 获取 Xcode 4.1 时,它会将安装程序下载到 /Applications
中。然后您必须手动运行该安装程序。这将添加 /usr/bin/cc
和其他工具的预期链接。
关于python - Mac osx Django PIL 错误/usr/bin/cc 重新安装时出现文件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6902976/