致命错误:Python.h:没有那个文件或目录 #include “Python.h“

在安装autogluon时候提示以下错误

gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python3.6m -I/tmp/pip-build-env-w9_ayv83/overlay/lib64/python3.6/site-packages/numpy/core/include -c ConfigSpace/hyperparameters.c -o build/temp.linux-x86_64-3.6/ConfigSpace/hyperparameters.o
  ConfigSpace/hyperparameters.c:6:20: 致命错误:Python.h:没有那个文件或目录
   #include "Python.h"
                      ^
  编译中断。
  /tmp/pip-build-env-w9_ayv83/overlay/lib/python3.6/site-packages/setuptools/dist.py:694: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
    % (opt, underscore_opt))
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for ConfigSpace
Failed to build ConfigSpace
ERROR: Could not build wheels for ConfigSpace which use PEP 517 and cannot be installed directly

这是因为我的linux上安装了python3 没有编译环境

yum install python3-devel

完美解决

  • 2
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值