鱼C论坛

 找回密码
 立即注册
查看: 661|回复: 5

linux下安装scrapy失败

[复制链接]
发表于 2019-1-26 21:48:14 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能^_^

您需要 登录 才可以下载或查看,没有账号?立即注册

x
linux下安装scrapy失败!
权限不能发图,见谅!
以下是linux终端显示内容:


    copying src/twisted/internet/test/fake_CAs/thing2.pem -> build/lib.linux-x86_64-3.6/twisted/internet/test/fake_CAs
    running build_ext
    building 'twisted.test.raiser' extension
    creating build/temp.linux-x86_64-3.6
    creating build/temp.linux-x86_64-3.6/src
    creating build/temp.linux-x86_64-3.6/src/twisted
    creating build/temp.linux-x86_64-3.6/src/twisted/test
    x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.6-EKG1lX/python3.6-3.6.5=. -specs=/usr/share/dpkg/no-pie-compile.specs -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c src/twisted/test/raiser.c -o build/temp.linux-x86_64-3.6/src/twisted/test/raiser.o
    src/twisted/test/raiser.c:4:10: fatal error: Python.h: 没有那个文件或目录
     #include "Python.h"
              ^~~~~~~~~~
    compilation terminated.
    error: command 'x86_64-linux-gnu-gcc' failed with exit status 1  
    ----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-m6fnu50k/Twisted/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-pg2g2g60-record/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-m6fnu50k/Twisted/


小甲鱼最新课程 -> https://ilovefishc.com
回复

使用道具 举报

 楼主| 发表于 2019-1-26 22:00:16 | 显示全部楼层

没看懂,大概是缺少哪个再从新安装哪个,我是缺少哪个阿?或者哪理解错了
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

 楼主| 发表于 2019-1-26 22:15:18 | 显示全部楼层
iwanna 发表于 2019-1-26 22:05
不知道你缺少那个,你全安装了不就行了,第二个答案

安好几遍了,最好看看缺哪个?
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

发表于 2019-1-26 23:29:13 | 显示全部楼层
本帖最后由 jackz007 于 2019-1-26 23:46 编辑

        应该是缺了 Python.h 这个文件,我的情况是 Windows XP,Python 2.7.13,这个文件位于:C:\Python27\Include 文件夹下,同时,在 MinGW-w64 文件包的 mingw32\opt\include\python2.7 路径下也有,楼主可以试着在自己的机器上也找找看。

        如果找到,应该把这个文件复制到:build/temp.linux-x86_64-3.6/src/twisted/test/ 路径下
小甲鱼最新课程 -> https://ilovefishc.com
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|鱼C工作室 ( 粤ICP备18085999号-1 | 粤公网安备 44051102000585号)

GMT+8, 2026-1-13 18:36

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表