尝试从pypi安装Python包时,出现了“command 'gcc'失败”的错误提示。

我正在尝试从Python软件包索引安装'pyskein'(sudo easy_install3 skein),但安装失败并显示以下错误:

src/threefish.c:23:20: fatal error: Python.h: No such file or directory
compilation terminated.
error: Setup script exited with error: command 'gcc' failed with exit status 1

我已经安装了build-essential软件包。
1个回答

您的系统缺少Python头文件。要解决此问题,请运行以下命令:
sudo apt-get install python-dev

或者

sudo apt-get install python3-dev