Closed GoogleCodeExporter closed 9 years ago
You need python header files in order to compile the C module extension.
I'm not sure how you do that on Centos.
On ubuntu you install them with "sudo apt-get install python-dev".
Original comment by g.rodola
on 28 Mar 2011 at 8:31
Thanks you very much!
Succeeded to install from sources.
P.S. FYI, but with easy_install there's still problem:
$ sudo easy_install psutil
Processing psutil
error: Couldn't find a setup script in psutil
Original comment by eina...@gmail.com
on 28 Mar 2011 at 8:37
Strange:
giampaolo@ubuntu:~test$ sudo easy_install-2.6 psutil
Searching for psutil
Reading http://pypi.python.org/simple/psutil/
Reading http://code.google.com/p/psutil/
Best match: psutil 0.2.1
Downloading http://psutil.googlecode.com/files/psutil-0.2.1.tar.gz
Processing psutil-0.2.1.tar.gz
Running psutil-0.2.1/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-ND0iYc/psutil-0.2.1/egg-dist-tmp-AJqm3o
psutil/_psutil_linux.c: In function ‘init_psutil_linux’:
psutil/_psutil_linux.c:161: warning: unused variable ‘st’
zip_safe flag not set; analyzing archive contents...
Adding psutil 0.2.1 to easy-install.pth file
Installed
/usr/local/lib/python2.6/dist-packages/psutil-0.2.1-py2.6-linux-x86_64.egg
Processing dependencies for psutil
Finished processing dependencies for psutil
Original comment by g.rodola
on 28 Mar 2011 at 8:42
Sorry, my fault. ( I was trying to run easy_install from psutil directory )
This confused it.
$ cd
$ sudo easy_install psutil
Searching for psutil
Best match: psutil 0.2.1
Processing psutil-0.2.1-py2.4-linux-x86_64.egg
psutil 0.2.1 is already the active version in easy-install.pth
Using /usr/lib/python2.4/site-packages/psutil-0.2.1-py2.4-linux-x86_64.egg
Processing dependencies for psutil
Thanks for help!
Original comment by eina...@gmail.com
on 28 Mar 2011 at 9:14
Original comment by g.rodola
on 28 Mar 2011 at 9:22
[deleted comment]
[deleted comment]
Actually, I had the same issue and same error messages on Citrix 5.6 release,
which is based on Centos5. Anyone could help?
# cat /etc/redhat-release
XenServer release 5.6.199-43873p (xenenterprise)
# python -V
Python 2.4.3
# sudo easy_install psutil
Searching for psutil
Reading http://pypi.python.org/simple/psutil/
Reading http://code.google.com/p/psutil/
Best match: psutil 0.2.1
Downloading http://psutil.googlecode.com/files/psutil-0.2.1.tar.gz
Processing psutil-0.2.1.tar.gz
Running psutil-0.2.1/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-ftjfov/psutil-0.2.1/egg-dist-tmp--eofoc
psutil/_psutil_linux.c:7:20: error: Python.h: No such file or directory
In file included from psutil/_psutil_linux.c:13:
psutil/_psutil_linux.h:9: error: expected 鈥?鈥? 鈥?鈥? 鈥?鈥?
鈥榓sm鈥?or 鈥榑_attribute__鈥?before 鈥?鈥?token
psutil/_psutil_linux.h:10: error: expected 鈥?鈥? 鈥?鈥? 鈥?鈥?
鈥榓sm鈥?or 鈥榑_attribute__鈥?before 鈥?鈥?token
psutil/_psutil_linux.c: In function 鈥榠oprio_get鈥?
psutil/_psutil_linux.c:26: warning: implicit declaration of function
鈥榮yscall鈥
psutil/_psutil_linux.c: At top level:
psutil/_psutil_linux.c:46: error: expected 鈥?鈥? 鈥?鈥? 鈥?鈥?
鈥榓sm鈥?or 鈥榑_attribute__鈥?before 鈥?鈥?token
psutil/_psutil_linux.c:69: error: expected 鈥?鈥? 鈥?鈥? 鈥?鈥?
鈥榓sm鈥?or 鈥榑_attribute__鈥?before 鈥?鈥?token
psutil/_psutil_linux.c:93: error: expected 鈥?鈥? 鈥?鈥? 鈥?鈥?
鈥榓sm鈥?or 鈥榑_attribute__鈥?before 鈥楶sutilMethods鈥
psutil/_psutil_linux.c:105: error: expected specifier-qualifier-list before
鈥楶yObject鈥
psutil/_psutil_linux.c: In function 鈥榠nit_psutil_linux鈥?
psutil/_psutil_linux.c:156: error: 鈥楶yObject鈥?undeclared (first use in
this function)
psutil/_psutil_linux.c:156: error: (Each undeclared identifier is reported only
once
psutil/_psutil_linux.c:156: error: for each function it appears in.)
psutil/_psutil_linux.c:156: error: 鈥榤odule鈥?undeclared (first use in this
function)
psutil/_psutil_linux.c:156: warning: implicit declaration of function
鈥楶y_InitModule鈥
psutil/_psutil_linux.c:156: error: 鈥楶sutilMethods鈥?undeclared (first use
in this function)
psutil/_psutil_linux.c:161: warning: unused variable 鈥榮t鈥
error: Setup script exited with error: command 'gcc' failed with exit status 1
Original comment by wise...@gmail.com
on 12 Apr 2011 at 10:20
You need to install the Python headers, same as in the original issue report.
If the pytthon-dev package or headers are not available then there is no
Python.h on your system.
Original comment by jlo...@gmail.com
on 13 Apr 2011 at 4:24
On Centos 6 running:
yum install python-devel
installs the python header files.
Original comment by awa...@awatts.co.uk
on 21 Dec 2012 at 11:37
I don't have yum...is there anyway to install python-dev with rpm? if you know
the package for python-2.6.6 and redhat6.4
Original comment by hotsho...@gmail.com
on 16 Oct 2013 at 11:15
# easy_install psutil
Searching for psutil
Reading https://pypi.python.org/simple/psutil/
Download error on https://pypi.python.org/simple/psutil/: [Errno -3] Temporary
failure in name resolution -- Some packages may not be found!
Couldn't find index page for 'psutil' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: [Errno -3] Temporary failure
in name resolution -- Some packages may not be found!
No local packages or download links found for psutil
error: Could not find suitable distribution for Requirement.parse('psutil')
Original comment by hotsho...@gmail.com
on 16 Oct 2013 at 11:17
Original issue reported on code.google.com by
eina...@gmail.com
on 28 Mar 2011 at 8:21