pyspider安装问题解决Please specify --curl-dir=/path/to/built/libcurl
生活随笔
收集整理的這篇文章主要介紹了
pyspider安装问题解决Please specify --curl-dir=/path/to/built/libcurl
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
背景
項(xiàng)目中需要做個(gè)網(wǎng)絡(luò)爬蟲(chóng),想使用Python爬蟲(chóng)框架pyspider,遇到安裝報(bào)錯(cuò)如下
# 執(zhí)行安裝 >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.?
字面提示是在安裝的過(guò)程中需要指定一個(gè)依賴項(xiàng)(),這個(gè)確實(shí)沒(méi)有Maven管理來(lái)的方便...
于是從PythonLibs官網(wǎng)中獲取依賴并自行下載到本地
PS:因?yàn)橐蕾図?xiàng)太多,需要依據(jù)提示中少了的libcur去查找【ctl+F,在彈出的框中搜索libcurl】,然后找到和自己適配的版本 ,筆者是python38 32位的,所以選擇如下
?
如果版本不兼容的話會(huì)報(bào)錯(cuò)
ERROR: pycurl-7.43.0.4-cp38-cp38-win_amd64.whl is not a supported wheel on this platform.
再次執(zhí)行>pip install pyspider,安裝成功
總結(jié)
以上是生活随笔為你收集整理的pyspider安装问题解决Please specify --curl-dir=/path/to/built/libcurl的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 一个算法笨蛋的12月leetCode刷题
- 下一篇: 第二周:四人小组项目