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. 关于perl闭包(个人理解)

    我个人理解,就是当一个变量超出作用域时,应是消失了,不见了的,但你还能访问它,这就是闭包. # #看下面的例子. #!/usr/bin/env perl -w use strict; { my $va ...

  2. json处理三部曲之第一曲:利用json-lib-xxx.jar处理json

    json-lib-xxx.jar包必需5个依赖包(实测): ezmorph-xxx.jar commons-lang-xxx.jar commons-beanutils-xxx.jar commons ...

  3. 关于Webdriver自动化测试时,页面数据与数据库id不一致的处理方式,需要使用鼠标事件

    有时候Web页面需要通过onmouseout事件去动态的获取数据库的数据,在使用Webdriver进行自动化测试的时候,对于页面显示的数据,其在数据库可能会存在一个id或者code,但是id或者cod ...

  4. 查询mysql中经纬度判断坐标范围

    先上代码,稍后附上说明: 1. 从mysql中取出记录,打印有效经纬度: import json import MySQLdb # lines = c.fetchall() #所有的记录,一个tupl ...

  5. [NPOI2.0] 使用NPOI读取和导出Excel文件

    先来说下一直使用的 Microsoft.Office.Interop.Excel ,在系统正式使用时遇到的问题 1:Excel读取数据BUG 由于使用Microsoft.Office.Interop. ...

  6. check2

    //文件check.js //将方法句柄赋值给变量$,简化document.getElementById(); var $ = document.getElementById; //定义模拟类(定义C ...

  7. Flask -- 路由

    route()装饰器把一个函数绑定到对应的URL(可以是多个)上 @app.route('/') def index(): return 'Index Page' @app.route('/hello ...

  8. 使用httperrequest,模拟发送及接收Json请求

    使用httpreques\Json-Handle\tcpdump\wireshark工具进行,抓取手机访问网络的包,分析request及response请求,通过httprequester来实现模拟发 ...

  9. 用jQuery写的最简单的表单验证

    近几天完成了关于我们项目的最简单的表单验证,是用jQuery写的,由于之前也一直没学过jQuery,所以自己也是一直处于边摸索边学习的阶段,经过这一段时间的学习,通过查资料啥的,也发现了学习jQuer ...

  10. redis第一篇--综述

    1 redis里边有数据库的概念.可分为1-255这些表.在存储或者查找的时候要指明. redis_sentinel 集群里边封装成了namespace这样的概念.与db是不一样的.