2016-01-25 159 views
0

我想在Ubuntu(在Windows機器上的Virtualbox上運行)中安裝scrapy模塊。安裝在Ubuntu新鮮安裝Scrapy時出錯

當我做pip install scrapy,我得到以下錯誤在結束安裝:

Command /usr/bin/python -c "import setuptools, tokenise; 
__file__='/tmp/pip-build-csKz7u/Twisted/setup.py'; 
exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
install --record /tmp/pip-FIY6qO-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /tmp/pip-build-csKz7u/Twisted 
Storing debug log for failure in /root/.pip/pip.log 

我缺少什麼或者做錯了什麼?

+0

'/ root/.pip/pip.log'中的任何內容? – mgilson

+0

不確定。這裏是:http://pastebin.com/FVUrNuRW – user1406716

回答

0

Ubuntu默認不帶有python頭文件和庫,它位於python-dev。在安裝scrapy之前運行以下命令進行安裝。

sudo apt-get update; sudo apt-get install python-dev -y