如何在MACOSX 10.11.6上无错误地构建PyCurl

如何在MACOSX 10.11.6上无错误地构建PyCurl,macos,curl,pycurl,Macos,Curl,Pycurl,我试图根据libcurl(7.53.1)的一个版本构建Pycurl,但没有成功 我在MACOSX El Capitan v10.11.6上 在这一点上,我甚至不确定我是否与OpenSSL保持一致。我可能需要确保OpenSSL安装正确,并使用OpenSSL构建Curl。最后,使用适当的卷曲来构建Pycurl 我在网上被跟踪了好几条,但没有一条能让我达到我需要的地方 解决此构建问题的最佳选择是什么 日志: 好的,构建Pycurl肯定有一些挑战。以下是我采取的步骤: 确保已安装OpenSSL(如果未使

我试图根据libcurl(7.53.1)的一个版本构建Pycurl,但没有成功

我在MACOSX El Capitan v10.11.6上

在这一点上,我甚至不确定我是否与OpenSSL保持一致。我可能需要确保OpenSSL安装正确,并使用OpenSSL构建Curl。最后,使用适当的卷曲来构建Pycurl

我在网上被跟踪了好几条,但没有一条能让我达到我需要的地方

解决此构建问题的最佳选择是什么

日志:


好的,构建Pycurl肯定有一些挑战。以下是我采取的步骤:

  • 确保已安装OpenSSL(如果未使用Brew:Brew安装OpenSSL)

  • 使用OpenSSL重建Curl,请记住,默认情况下,在MacOsX/El Capitan上,Curl不是使用OpenSSL构建的,而是使用SecureTransport。(尝试:brew安装--强制卷曲--使用openssl)

  • 用“pip”重建Pycurl。我在pip方面取得了成功,但在easy_安装方面没有成功。(try:sudo env ARCHFLAGS=“-arch x86_64”LDFLAGS=“-L/usr/local/opt/openssl/lib”pip install pycurl)

  • Pycurl安装在:/Library/Python/2.7/site-packages/Pycurl.so下


    安装的版本是:pycurl-7.43.0

    好的,构建pycurl肯定有一些挑战。以下是我采取的步骤:

  • 确保已安装OpenSSL(如果未使用Brew:Brew安装OpenSSL)

  • 使用OpenSSL重建Curl,请记住,默认情况下,在MacOsX/El Capitan上,Curl不是使用OpenSSL构建的,而是使用SecureTransport。(尝试:brew安装--强制卷曲--使用openssl)

  • 用“pip”重建Pycurl。我在pip方面取得了成功,但在easy_安装方面没有成功。(try:sudo env ARCHFLAGS=“-arch x86_64”LDFLAGS=“-L/usr/local/opt/openssl/lib”pip install pycurl)

  • Pycurl安装在:/Library/Python/2.7/site-packages/Pycurl.so下

    安装的版本为:pycurl-7.43.0

    users-MBP-2:~ mickael$ sudo easy_install pycurl 
    Password:
    Searching for pycurl
    Reading https://pypi.python.org/simple/pycurl/ Best match: pycurl 7.43.0
    Downloading https://pypi.python.org/packages/12/3f/557356b60d8e59a1cce62ffc07ecc03e4f8a202c86adae34d8958262 81fb/pycurl-7.43.0.tar.gz#md5=c94bdba01da6004fa38325e9bd6b9760
    Processing pycurl-7.43.0.tar.gz
    Writing /tmp/easy_install-tmm5sV/pycurl-7.43.0/setup.cfg
    Running pycurl-7.43.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-tmm5sV/pycurl-7.43.0/egg-dist- tmp-Yj_ArM
    Using curl-config (libcurl 7.53.1)
    warning: no files found matching 'src/Makefile'
    In file included from src/docstrings.c:4:
    In file included from src/pycurl.h:32:
    In file included from /usr/local/Cellar/curl/7.53.1/include/curl/curl.h:39: /usr/local/Cellar/curl/7.53.1/include/curl/curlrules.h:143:6: error: '__curl_rule_01__' declared as an array with a negative
    size
    [CurlchkszEQ(long, CURL_SIZEOF_LONG)];
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.53.1/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ' #define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
    ^~~~~~~~~~~~~~~~~~~~~~~
    /usr/local/Cellar/curl/7.53.1/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)];
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/local/Cellar/curl/7.53.1/include/curl/curlrules.h:132:27: note: expanded from macro 'CurlchkszEQ' #define CurlchkszEQ(t, s) sizeof(t) == s ? 1 : -1
    ^~~~~~~~~~~~~~~~~~~~~~~ In file included from src/docstrings.c:4:
    src/pycurl.h:190:5: warning: "libcurl was compiled with SSL support, but configure could not determine
    which " "library was
    used; thus no SSL crypto locking callbacks will be set, which may "
    requests" [-W#warnings]
    # warning \ ^
    1 warning and 2 errors generated.
    error: Setup script exited with error: command 'cc' failed with exit status 1
    "cause random crashes on SSL