尝试从 pypi 安装 Python 包时出现“命令‘gcc’失败”

Ste*_*zzo 7 python programming gcc

我正在尝试从 Python 包索引 ( sudo easy_install3 skein)安装“pyskein” ,但安装失败并出现以下错误:

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
Run Code Online (Sandbox Code Playgroud)

我已经安装了build-essential

Ste*_*zzo 7

您的系统缺少 Python 标头。要解决此问题,请运行

sudo apt-get install python-dev
Run Code Online (Sandbox Code Playgroud)

或者

sudo apt-get install python3-dev
Run Code Online (Sandbox Code Playgroud)