记录安装psutil模块

windows下可以使用如下方法安装:

https://pypi.python.org/packages/3.4/p/psutil/

到这个地址下载符合版本的软件包下载,然后安装即可。

ubuntu下需要下载tar包来安装

wget https://pypi.python.org/packages/source/p/psutil/psutil-2.1.3.tar.gz 
tar zxvf psutil-2.1.3.tar.gz
cd psutil-2.1.3/
python setup.py install(或者使用 pip install psutil安装,但是需要提前安装pip)

安装pip方法

apt-get install python-pip

安装psutil报错:

psutil/_psutil_linux.c:12:20: fatal error: Python.h: 没有那个文件或目录
 #include <Python.h>
                    ^
compilation terminated.
error: command ‘x86_64-linux-gnu-gcc‘ failed with exit status 1

解决办法:

需要安装python的一个依赖包 python-dev

apt-get install python-dev
时间: 2024-08-21 16:05:10

记录安装psutil模块的相关文章

pip安装psutil模块时候报错:yum install python-devel mysql-devel zlib-devel openssl-devel

yum install python-devel mysql-devel zlib-devel openssl-devel [[email protected] software]# pip install psutil Collecting psutil Using cached psutil-2.2.1.tar.gz Installing collected packages: psutil Running setup.py install for psutil Successfully i

python笔记之psutil模块

收集教程 http://www.cnblogs.com/xiao1/p/6164204.html 实战教程 安装psutil模块 pip2 install psutil 实战代码 #encoding=utf-8 import psutil print psutil.cpu_times() print psutil.disk_partitions() print psutil.virtual_memory()

安装Python的psutil模块时报错:error: command &#39;gcc&#39; failed with exit status 1

安装Python的psutil模块: tar zxvf psutil-2.0.0.tar.gz cd psutil-2.0.0 python setup.py install 报错: running install running bdist_egg ...... psutil/_psutil_linux.c:12:20: error: Python.h: No such file or directory In file included from psutil/_psutil_linux.c

安装lxml模块记录

安装这个模块坎坷颇多 首先确认ubuntu源.. 我的版本是14.04.去找了官网的元替换source.list 然后 apt-get update 在用pip和easy_install安装LXML的时候会提示少两个包 ** make sure the development packages of libxml2 and libxslt are installed ** 需要安装libxml2和libxslt 确保你已经更新了源 然后 apt-get install libxml2 apt-g

安装psutil时提示缺少python.h头文件(作记录)

通过pip或者源码安装psutil,都会提示缺少python.h头文件,错误提示如下: ... psutil/_psutil_common.c:9:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated. error: command 'gcc' failed with exit status 1 ... 出现此错误的原因是没有安装python-devel

python安装mysqldb模块

今天在阿里云一台新的服务器部署程序后台,发现上面的python缺少MySQLDB 模块,记录安装过程. 首先django程序,运行 python manage.py sycdb 报错: ImproperlyConfigured: Error loading MySQLdb module: No module named MySQLdb MySQLdb模块的包名字叫mysql-python,于是pip安装之,(关于pip,可以参考这篇文章) 运行: pip install mysql-python

学习搭建一个小网站_3_安装NodeJS模块_建立express

nodejs安装这些模块: express, express-generator, mongodb, mysql 简单步骤:建立目录 d:\js\BlogWebSite cmd->cd d:->mkdir js->cd js->mkdir BlogWebSite->cd BlogWebSite cmd下首先安装全局模块:( -g 参数是全局安装 ) 1. npm install express -g 2. npm install express-generator -g 在j

Ubuntu安装Python模块时的报错

在安装Python的psutil模块时,报"error: command 'x86_64-linux-gnu-gcc' failed with exit status 1"的错误,系统提示缺少Python的头文件,那就是说系统没有安装python的开发包,安装之就行了. $ sudo pip install psutil [sudo] password for richard:  Downloading/unpacking psutil   Downloading psutil-2.2

搭建PHP开发环境 apache+MySQL+PHP 安装phpMyAdmin模块

该博文参考的资料来源于: http://wenku.baidu.com/view/0e4c569ddd3383c4bb4cd267.html http://www.cnblogs.com/pharen/archive/2012/02/06/2340628.html http://www.admin10000.com/document/54.html http://blog.csdn.net/zutsoft/article/details/21651041 昨天花了差不多一天的时间,跳过无数“坑”