1.在ubuntu下安裝scrapy出現錯誤error: command 'x86_64-linux-gnu-gcc' failed with exit status 1 錯誤如下所示:
解決方法:
1.首先更新下你的軟件源,sudo apt-get update
2.然後在終端執行~$ sudo apt-get install python-dev 得到如下圖所示:
3.執行完後,上面上圖會有提示說sudo apt autoremove 意思自動刪除沒有用的包,
我們在終端執行命令~$ sudo apt autoremove
4. 執行完後,我們開始進行scrapy安裝:
sudo pip install scrapy #沒有使用豆瓣源
sudo pip install -i https://pypi.douban.com/simple/ scrapy #使用了豆瓣源,可以加速下載
5.安裝完成後,我們在終端輸入~$ scrapy -h 進行查看是否安裝成功。
這樣我們就安裝完成了。