django - 在mac上安装uWSGI时出错

标签 django uwsgi

我需要 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

最佳答案

gcc 已经安装,只需 export CC=gcc 就可以了。

关于django - 在mac上安装uWSGI时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11669594/

相关文章:

python - 值错误 : Don't mix *args and **kwargs in call to reverse()!

python - JSON 解析错误 - 当我尝试使用 Angular+REST 上传 Excel 工作表时, 'utf-8' 编解码器无法解码位置 XXX 中的字节 0xc9

python - Django - GeoDjango 以错误的顺序读取坐标

python - Django 无法识别 django 管理 url

django - centos上设置nginx+django服务时uwsgi无法加载app

django - uwsgi + nginx + Django : ImportError: No module named django. core.wsgi

django - boto.exception.S3ResponseError : S3ResponseError: 403 Forbidden 错误

python - uWSGI Empire 模式无法在 Virtualenv 之外工作

python - 作为服务启动并 POST 大文件时 UWSGI 崩溃 : ConnectionError

http - 如何让 uwsgi --http-to 能够同时处理多个响应?