python.h 没有那个文件或目录_致命错误:Python.h:没有这样的文件或目录

这篇博客提供了在不同Linux发行版中安装Python开发头文件和静态库的步骤,包括使用apt、yum、dnf、zypper和apk等包管理器的命令。这对于进行Python开发或编译Python模块是必要的。
摘要由CSDN通过智能技术生成

看起来您还没有正确安装pythondev的头文件和静态库。使用您的包管理器在系统范围内安装它们。

为apt (乌本图Debian.。):sudo apt-get install python-dev # for python2.x installssudo apt-get install python3-dev # for python3.x installs

为yum (CentOS,RHEL.。):sudo yum install python-devel # for python2.x installssudo yum install python34-devel # for python3.4 installs

为dnf (软呢帽.。):sudo dnf install python2-devel # for python2.x installssudo dnf install python3-devel # for python3.x installs

为zypper (开诚布公.。):sudo zypper in python-devel # for python2.x installssudo zypper in python3-devel # for python3.x installs

为apk (阿尔卑斯山.。):# This is a departure from the normal Alpine naming# scheme, which uses py2- and py3- prefixessudo apk add python2-dev

# for python2.x installssudo apk add python3-dev # for python3.x installs

为apt-cyg (西格温.。):apt-cyg install python-devel # for python2.x installsapt-cyg install python3-devel # for python3.x installs

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值