美文网首页快乐学python
一步解决mac osx下pycurl安装问题

一步解决mac osx下pycurl安装问题

作者: DS事务所 | 来源:发表于2019-03-15 18:17 被阅读0次

    最近几天在macbook上安装pycurl遇到的问题,谷歌了各种解决方案,有说虚拟环境设置的、修改系统OpenSSL设置的,发现都没什么用。一直都是下面这个报错:

    File "/tmp/pip-install-mKzGEO/pycurl/setup.py", line 316, in configure_unix
            specify the SSL backend manually.''')
        __main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.
        
        ----------------------------------------
    __main__.ConfigurationError: Curl is configured to use SSL, but we have not been able to determine which SSL backend it is using. Please see PycURL documentation for how to specify the SSL backend manually.
    

    解决方法——VirtualEnv下执行下面这段命令(其实是哪执行的安装哪,要全局安装就不用进Python虚拟环境):

    export PYCURL_SSL_LIBRARY=openssl
    export LDFLAGS=-L/usr/local/opt/openssl/lib;export CPPFLAGS=-I/usr/local/opt/openssl/include;pip install pycurl --compile --no-cache-dir
    

    问题总结:

    --compile --no-cache-dir // 这里是问题关键
    

    相关文章

      网友评论

        本文标题:一步解决mac osx下pycurl安装问题

        本文链接:https://www.haomeiwen.com/subject/rwvrmqtx.html