我需要 uWSGI 来运行 django 项目。因此,当我尝试安装 uWSGI 时,它给了我一个错误消息“例外:您需要 C 编译器来构建 uWSGI”。但是mac自带gcc编译器。
我已经从“ http://projects.unbit.it/uwsgi/wiki/WikiStart#Getit ”下载了 uWSGI,并尝试通过命令“python setup.py install”进行安装
这是我在安装 uWSGI 时遇到的错误
running install
using profile: buildconf/default.ini
detected include path: ['/usr/local/include', '/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple
darwin11/4.2.1/include', '/usr/include', '/System/Library/Frameworks', '/Library/Frameworks']
Traceback (most recent call last):
File "setup.py", line 98, in <module>
distclass=uWSGIDistribution,
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py",
line 152, in setup
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",
line 953, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py",
line 972, in run_command
cmd_obj.run()
File "setup.py", line 61, in run
conf = uc.uConf(get_profile())
File "/Users/jay/Downloads/Softwares/Work/uwsgi-1.2.4/uwsgiconfig.py", line 340, in __init__
raise Exception("you need a C compiler to build uWSGI")
Exception: you need a C compiler to build uWSGI