解決:Python3.6下安裝scrapy出現(xiàn)的問題

問題背景:安裝scrapy
pip install scrapy  
或者
pip install -i https://pypi.douban.com/simple scrapy

可能會(huì)報(bào)出:
錯(cuò)誤1


image1.png

錯(cuò)誤2


Image 2.png
解決:
1.解決錯(cuò)誤1----》

進(jìn)入
https://www.lfd.uci.edu/~gohlke/pythonlibs/
1)搜索lxml
https://www.lfd.uci.edu/~gohlke/pythonlibs/#lxml
查找對(duì)應(yīng)版本,3.6找cp36,2.7找cp27,我的是3.6

Image 3.png

2)下載到指定目錄:例如E:\python
3)進(jìn)入到指定目錄,進(jìn)入虛擬環(huán)境
E:\python>workon scrapy
4)安裝:
pip install lxml-4.3.1-cp36-cp36m-win_amd64.whl
顯示successfully

如果不成功,換成win32

5)重新安裝scrapy
進(jìn)入虛擬環(huán)境
pip install scrapy
或者
pip install -i https://pypi.douban.com/simple scrapy

2、解決錯(cuò)誤2----》

進(jìn)入https://www.lfd.uci.edu/~gohlke/pythonlibs/
1)搜索teisted
https://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted
查找對(duì)應(yīng)版本,3.6找cp36,2.7找cp27,我的是3.6

Image 4.png

2)下載到指定目錄:例如E:\python
3)進(jìn)入到指定目錄,進(jìn)入虛擬環(huán)境
E:\python>workon scrapy
4)安裝:
pip install Twisted-18.9.0-cp36-cp36m-win_amd64.whl
顯示successfully

如果顯示:

Twisted-18.9.0-cp36-none-win64.whl is not a supported wheel on this platform.

換成win32

5)重新安裝scrapy
進(jìn)入虛擬環(huán)境
pip install scrapy
或者
pip install -i https://pypi.douban.com/simple scrapy

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。

相關(guān)閱讀更多精彩內(nèi)容

友情鏈接更多精彩內(nèi)容