ubuntu - 在 Ubuntu 13.04 上安装 Scrapy 时出错

标签 ubuntu scrapy pip easy-install

当我尝试使用命令 sudo easy_install -U Scrapy 在 ubuntu 13.04 上安装 Scrapy 时,出现以下错误:

Searching for Scrapy
Reading pypi.python.org/simple/Scrapy/
Best match: Scrapy 0.16.5
Processing Scrapy-0.16.5-py2.7.egg
Scrapy 0.16.5 is already the active version in easy-install.pth
Installing scrapy script to /usr/local/bin

Using /usr/local/lib/python2.7/dist-packages/Scrapy-0.16.5-py2.7.egg
Processing dependencies for Scrapy
Searching for Twisted>=8.0
Reading pypi.python.org/simple/Twisted/
Best match: Twisted 13.1.0
Downloading pypi.python.org/packages/source/T/Twisted/Twisted-13.1.0.tar.bz2#md5=5609c91ed465f5a7da48d30a0e7b6960
Processing Twisted-13.1.0.tar.bz2
Writing /tmp/easy_install-xYafJF/Twisted-13.1.0/setup.cfg
Running Twisted-13.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-xYafJF/Twisted-13.1.0/egg-dist-tmp-ybetxt
twisted/runner/portmap.c:10:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

我也试过 pip install Scrapy 命令,但我再次遇到同样的错误 x86_64-linux-gnu-gcc

你能帮我在 Ubuntu 13.04 上安装 Scrapy 吗?

最佳答案

对我来说,我安装了 python dev 但仍然无法正常工作(尝试安装加密时失败),我发现 this堆栈溢出帖子说运行此命令以保证安装所有依赖项

sudo apt-get install build-essential libssl-dev libffi-dev python-dev libxml2-dev

这对我有用

关于ubuntu - 在 Ubuntu 13.04 上安装 Scrapy 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17611324/

相关文章:

linux - 我可以安排 ansible playbook 在每天的特定时间运行吗

Linux "mv"命令,创建一个新文件(没有可用文件夹时)

python - scrapy - 无法正确地将多个 URL 从 <p> 标签提取到项目列表中

python - pip install django 结果没有为 django 找到匹配的分布

python - 找不到 `pip install -r requirements.txt` 安装的包

c - (初学者 c GUI 程序)GTK+ 和 C 程序在显示图标时遇到问题

c++ - 段错误(核心转储)-Xubuntu

python - 在没有有效响应之前无法一一使用代理

python - Scrapy 图像管道警告 : File (unknown-error): Error downloading image from <GET

python - 安装python模块时出现语法错误