mac 下安裝pyspider出現安裝pycurl錯誤(python3版本以上)
mac下安裝pyspider出現錯誤如下:
Command “python setup.py egg_info” failed with error code 1 in /private/var/folders/......
緊接著我用了pip3 安裝pycurl出現錯誤如下:
__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. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /private/var/......
最後我嘗試了一些解決辦法,下面這種成功安裝了pycurl:
開啟終端,依次輸入以下命令列:
export PYCURL_SSL_LIBRARY=openssl
export LDFLAGS=-L/usr/local/opt/openssl/lib
export CPPFLAGS=-I/usr/local/opt/openssl/include
pip3 install pycurl
最後安裝pyspider:
pip3 install pyspider
安裝後輸入pyspider all 看看能不能成功啟動
還有就是如果你的python版本是3.7還會遇到關鍵字問題,至少我安裝的時候pyspider沒有修訂它的程式碼,所以我又安裝了python3.6,才成功啟動pyspider