700字范文,内容丰富有趣,生活中的好帮手!
700字范文 > fatal error: Python.h: No such file or directory 解决

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

时间:2020-07-06 08:21:38

相关推荐

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

[常见错误] 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'extensionx86_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-csrc/_fastmath.c-obuild/temp.linux-x86_64-3.5/src/_fastmath.osrc/_fastmath.c:31:20:fatalerror:Python.h:Nosuchfileordirectorycommand'x86_64-linux-gnu-gcc'failedwithexitstatus1

解决方案

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

如果使用2.7: sudo apt-get install python-dev

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。