psutil/_psutil_linux.c:9:20: 错误:Python.h:没有那个文件或目录

In file included from psutil/_psutil_linux.c:19:
psutil/_psutil_linux.h:11: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.h:12: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.h:13: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.h:14: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.h:15: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.h:16: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.h:17: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c: 在函数‘ioprio_get’中:
psutil/_psutil_linux.c:32: 警告:隐式声明函数‘syscall’
psutil/_psutil_linux.c: 在文件层:
psutil/_psutil_linux.c:52: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c:75: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c:100: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c:150: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c:172: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c:192: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c:213: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
psutil/_psutil_linux.c:261: 错误:expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PsutilMethods’
psutil/_psutil_linux.c:285: 错误:expected specifier-qualifier-list before ‘PyObject’
psutil/_psutil_linux.c: 在函数‘init_psutil_linux’中:
psutil/_psutil_linux.c:335: 错误:‘PyObject’未声明(在此函数内第一次使用)
psutil/_psutil_linux.c:335: 错误:(即使在一个函数内多次出现,每个未声明的标识符在其
psutil/_psutil_linux.c:335: 错误:所在的函数内也只报告一次。)
psutil/_psutil_linux.c:335: 错误:‘module’未声明(在此函数内第一次使用)
psutil/_psutil_linux.c:335: 警告:隐式声明函数‘Py_InitModule’
psutil/_psutil_linux.c:335: 错误:‘PsutilMethods’未声明(在此函数内第一次使用)
error: command 'gcc' failed with exit status 1

===============================================================

解决方法是安装python-devel,这是Python的头文件和静态库包:

1.可以先查看一下含python-devel的包

yum search python | grep python-devel

2.64位安装python-devel.x86_64,32位安装python-devel.i686,我这里安装:

sudo yum install python-devel.x86_64

安装psutil模块报错&安装python-devel的更多相关文章

  1. pycharm安装 suds模块报错:AttributeError: module 'pip' has no attribute 'main'

    需求:安装suds模块 遇到的问题: 一.报错信息:[file][Default Settint]---Project Interpreter 点击 搜索suds安装模块报错 解决:依据上图提示找到C ...

  2. python 安装psutil包报错:

    报错: Failed building wheel for psutil Google得知,需要安装python-devel 和 wheel sudo dnf install python-devel ...

  3. (22)odoo 安装旧模块报错处理

    一些老版本的模块没有得到升级,所以经常碰到模块无法安装的问题. No module name osv 将模块的 from osv import osv,fields 改为 from openerp.o ...

  4. python安装mysqlclient模块报fatal error: Python.h:解决方法

    在搭建Flask框架安装mysqlclient模块时候老是报fatal error: Python.h:错误,折腾老半天,百度了老半天看了不少大神帖子,就是没解决, 后来发现这不是个BUG,都是自己的 ...

  5. 解决python2安装MySQL-python模块报错

    今天电脑重装系统,所有软件都重装一遍,MySQLdb模块一直装不好,纠结了好久,终于解决,方法分享给大家. MySQLdb模块安装: 1.下载MySQL-pyhon模块,网站为:https://pyp ...

  6. 如何升级nodejs版本 安装n模块报错 npm ERR! notsup Unsupported platform

    如何升级nodejs版本 首先安装n模块, 输入npm install -g n n模块专门用来管理nodejs的版本. 如果出现npm ERR! notsup Unsupported platfor ...

  7. Mac下安装第三方模块报错:‘sqlfront.h‘ file not found的解决办法

    1.软件环境: mac环境:10.11.6(15G31) python: 3.6 2.问题: sudo pip install pymssql 后出现下面问题: fatal error: 'sqlfr ...

  8. 在Centos7.x中安装psutil模块

    一.window10操作系统(Python 3.6开发环境)安装psutil 1.安装psutil模块 wget https://pypi.python.org/packages/source/p/p ...

  9. python pip安装模块报错 "Can't connect to HTTPS URL because the SSL module is not available."

    在升级python版本为3.6之后,pip安装模块报错. 报错信息如图: 原因是系统自带的openssl版本与python3的版本不匹配,所以这里只要升级openssl版本就可以解决问题. yum - ...

随机推荐

  1. html5学习(三)

    html5特点: 1 微数据与微格式等方面的支持. 2 本地存储,离线应用. 3 API调用,地图,位置,LBS等. 4 连接通讯,后台线程. 5 多媒体. 7 css3.

  2. ios简单实现如果没有开启定位,提示开启系统软件定位功能

    if([CLLocationManager locationServicesEnabled] && [CLLocationManager authorizationStatus] == ...

  3. spring中的控制反转IoC和依赖注入DI

    原文:http://blog.163.com/xianghuxian@126/blog/static/50639037200721345218382/ IoC(Inversion of Control ...

  4. 批量创建IP方法

    以下教程,将告诉大家如何在Windows系统中通过命令行,批量添加IP.目标,在本机的的网卡名称为“本地连接”的网卡中,批量添加192.168.1段的ip地址,起开始IP为10,每次增加1,知道22为 ...

  5. 移动端Click300毫秒点击延迟的来龙去脉(转)

    原文地址:What Exactly Is….. The 300ms Click Delay 快速响应是所有 UI 实现的重中之重.研究表明,当延迟超过 100 毫秒,用户就能感受到界面的卡顿. 然而, ...

  6. nodejs全局安装与本地安装区别

    本地安装 1. 将安装包放在 ./node_modules 下(运行 npm 命令时所在的目录),如果没有 node_modules 目录,会在当前执行 npm 命令的目录下生成 node_modul ...

  7. 第13章 Swing程序设计----JDialog窗体

    JDialog窗体是Swing组件中的对话框 JDialog窗体的功能是从一个窗体中弹出另一个窗体,就像是在使用IE浏览器时弹出的确定对话框一样. 在应用程序中创建JDialog窗体需要实例化JDia ...

  8. 在windows命令行窗口下执行:查看所有的端口占用情况

    开始--运行--cmd 进入命令提示符 输入netstat -ano 即可看到所有连接的PID 之后在任务管理器中找到这个PID所对应的程序如果任务管理器中没有PID这一项,可以在任务管理器中选&qu ...

  9. c#高级编程

    1..net才程序编译经过2步.首先把源代码编译成IL,这个是在visual studio中编译,然后是IL编译成机器语言,这个是在程序执行的时候进行的.

  10. maven之pom

    记录一下最近的pom的相关设置,plugin的官方地址配置:http://maven.apache.org/plugins/index.html 看了网上说了很多例子,有很多不清楚,看一下官方的,会有 ...