Mac安装Tornado


在命令行下执行:

sudo easy_install setuptools pycurl

过程中可能会出错:

In file included from src/docstrings.c:4:
In file included from src/pycurl.h:4:
/System/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7/Python.h:33:10: fatal error: 
      'stdio.h' file not found
#include <stdio.h>
         ^
1 error generated.
error: Setup script exited with error: command 'cc' failed with exit status 1

这是由于电脑中没有安装XCode Command Line Tools.

安装方法,在命令行中执行:

xcode-select --install

安装后,上边的错误消失了,但又有新的错误:

Using curl-config (libcurl 7.35.0)
In file included from src/docstrings.c:4:
In file included from src/pycurl.h:19:
In file included from /opt/local/include/curl/curl.h:35:
/opt/local/include/curl/curlrules.h:143:6: error: '__curl_rule_01__' declared as
      an array with a negative size
    [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/curl/curlrules.h:132:27: note: expanded from macro
      'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
                          ^~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/curl/curlrules.h:153:6: error: '__curl_rule_02__' declared as
      an array with a negative size
    [CurlchkszEQ(curl_off_t, CURL_SIZEOF_CURL_OFF_T)];
     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/opt/local/include/curl/curlrules.h:132:27: note: expanded from macro
      'CurlchkszEQ'
#define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
                          ^~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
error: Setup script exited with error: command 'cc' failed with exit status 1


评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值