首页 > 编程语言 > 详细

fatal error: Python.h: No such file or directory 解决

时间:2017-06-21 19:45:44      阅读:2475      评论:0      收藏:0      [点我收藏+]

[常见错误] fatal error: Python.h: No such file or directory

环境场景

系统: Parrot Linux
软件: 系统python默认版本2.7 PyCharm默认版本Python3.5
场景: Build pycrypto-2.6.1 失败
提示:

building ‘Crypto.PublicKey._fastmath‘ extension
x86_64-linux-gnu-gcc -pthread -fwrapv -Wall -Wstrict-prototypes -fdebug-prefix-map=/build/python3.5-MLq5fN/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -std=c99 -O3 -fomit-frame-pointer -Isrc/ -I/usr/include/ -I/usr/include/python3.5m -c src/_fastmath.c -o build/temp.linux-x86_64-3.5/src/_fastmath.o
src/_fastmath.c:31:20: fatal error: Python.h: No such file or directory

command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1

解决方案

如果使用3.5: sudo apt-get install python3.5-dev
如果使用2.7: sudo apt-get install python-dev


本文出自 “时不我待” 博客,请务必保留此出处http://13039510.blog.51cto.com/13029510/1940492

fatal error: Python.h: No such file or directory 解决

原文:http://13039510.blog.51cto.com/13029510/1940492

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!