在Ubuntu Fresh Install中安装Scrapy时出错

时间:2016-01-25 19:48:07

标签: python ubuntu scrapy

我正在尝试在Ubuntu中安装scrapy模块(在Windows机器上的Virtualbox中运行)。

当我执行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

我在这里错过了什么或做错了什么?

1 个答案:

答案 0 :(得分:0)

默认情况下,Ubuntu没有附带python头和库python-dev。在安装scrapy之前运行以下命令进行安装。

sudo apt-get  update; sudo apt-get install  python-dev -y
相关问题