mac执行pyspider all时报错ImportError: pycurl: libcurl link-?

问题描述

在安装完pyspider后执行pyspider all时报错了,报错内容是ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)

问题出现的平台版本及自己尝试过哪些方法

我的mac版本是10.12.6
Pycurl版本是7.43.0.2
OpenSSl版本是1.0.2r 26 Feb 2019

曾经尝试过网上说的三部曲:#很可惜该方法并不是万能的,依然有部分人使用了这个方法不管用
pip uninstall pycurl
export PYCURL_SSL_LIBRARY=openssl
pip install pycurl

也尝试过通过新下载的openssl来覆盖自带的poenssl,但都是无用功

相关代码

// 请把代码文本粘贴到下方(请勿用图片代替代码)
我看大部分人的报错都是:
ImportError: pycurl: libcurl link-time ssl backend (openssl) is different from compile-time ssl backend (none/other)
而我的报错是:
ImportError: pycurl: libcurl link-time ssl backend (none/other) is different from compile-time ssl backend (openssl)
不知道这两者有什么区别~

你期待的结果是什么?实际看到的错误信息又是什么?

希望有大神能帮我们解决该问题,并顺利执行pyspider all

阅读 2.6k
1 个回答

执行这段代码后解决了我的问题:
pip install pycurl==7.43.0.1 --global-option=build_ext --global-option="-L/usr/local/opt/openssl/lib" --global-option="-I/usr/local/opt/openssl/include"

转自https://segmentfault.com/q/10...

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
宣传栏