標籤:parrot python error pycrypto python.h
[常見錯誤] 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 -c src/_fastmath.c -o build/temp.linux-x86_64-3.5/src/_fastmath.osrc/_fastmath.c:31:20: fatal error: Python.h: No such file or directorycommand ‘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 解決