pyspider安装问题解决Please specify --curl-dir=/path/to/built/libcurl
生活随笔
收集整理的這篇文章主要介紹了
pyspider安装问题解决Please specify --curl-dir=/path/to/built/libcurl
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
背景
項目中需要做個網絡爬蟲,想使用Python爬蟲框架pyspider,遇到安裝報錯如下
# 執行安裝 >pip install pyspider?
ERROR: Command errored out with exit status 10:command: 'd:\java\pyworkspace\spider\venv\scripts\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\milla\\AppData\\Local\\Temp\\pip-install-4zai8mou\ \pycurl_b94259d1e5594c498458083d4b02bc99\\setup.py'"'"'; __file__='"'"'C:\\Users\\milla\\AppData\\Local\\Temp\\pip-install-4zai8mou\\pycurl_b94259d1e5594c498458083d4b02bc99\\setup.py'"' "';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base ' C:\Users\milla\AppData\Local\Temp\pip-pip-egg-info-adu6pbve'cwd: C:\Users\milla\AppData\Local\Temp\pip-install-4zai8mou\pycurl_b94259d1e5594c498458083d4b02bc99\Complete output (1 lines):Please specify --curl-dir=/path/to/built/libcurl---------------------------------------- ERROR: Command errored out with exit status 10: python setup.py egg_info Check the logs for full command output.?
字面提示是在安裝的過程中需要指定一個依賴項(),這個確實沒有Maven管理來的方便...
于是從PythonLibs官網中獲取依賴并自行下載到本地
PS:因為依賴項太多,需要依據提示中少了的libcur去查找【ctl+F,在彈出的框中搜索libcurl】,然后找到和自己適配的版本 ,筆者是python38 32位的,所以選擇如下
?
如果版本不兼容的話會報錯
ERROR: pycurl-7.43.0.4-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
再次執行>pip install pyspider,安裝成功
總結
以上是生活随笔為你收集整理的pyspider安装问题解决Please specify --curl-dir=/path/to/built/libcurl的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 一个算法笨蛋的12月leetCode刷题
- 下一篇: 第二周:四人小组项目