blob: feffe986f490afad155e1571229b31592b1729dd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
|
Introduction
============
psutil is a module providing an interface for retrieving information on running
processes in a portable way by using Python.
It currently supports Linux, OS X, FreeBSD and Windows.
psutil website is at http://code.google.com/p/psutil/
The following document describes how to compile and install psutil from sources
on different platforms.
Using easy_install
==================
The easiest way to install psutil from sources is using easy_install.
Get the latest easy_install version from http://pypi.python.org/pypi/setuptools
and just run:
> python easy_install psutil
This should get the most updated psutil version from the Python pypi repository,
unpack it, compile it and install it automatically.
Installing on Windows using mingw32
===================================
After the mingw [1] environment is properly set up on your system you can
compile Windows sources by entering:
> setup.py build -c mingw32
To compile and install just append the "install" keyword at the end of the
command line above, like this:
> setup.py build -c mingw32 install
It might be possible that distutils will complain about missing gcc executable.
That means you have to add mingw bin PATH variable first.
Entering this line in the command prompt should do the work:
> SET PATH=C:\MinGW\bin;%PATH%
NOTE: this assumes MinGW is installed in C:\MinGW, if not simply replace the
path in the command above with an appropriate location.
[1] http://www.mingw.org/
Installing on Windows using Visual Studio
=========================================
To use Visual Studio to install psutil, you must have the same version of
Visual Studio used to compile your installation of Python. For older versions
of Python that will be Visual Studio 2003. For 2.6 and later it should be
Visual Studio 2008. If you do not have the requisite version of Visual Studio
available then it is recommended to use MinGW to compile psutil instead.
If you do have Visual Studio installed, you can use the basic distutils
commands:
> setup.py build
or to install and build:
> setup.py install
distutils should take care of any necessary magic to compile from there.
Installing on OS X
==================
OS X installation from source will require gcc which you can obtain as part of
the 'XcodeTools' installer from Apple. Then you can run the standard distutils
commands:
to build only:
> ./setup.py build
to install and build:
> ./setup.py install
NOTE: due to developer's hardware limitations psutil has only been compiled and
tested on OS X 10.4.11 so may or may not work on other versions.
Installing on FreeBSD
=====================
The same compiler used to install Python must be present on the system in order
to build modules using distutils. Assuming it is installed, you can build using
the standard distutils commands:
build only:
> ./setup.py build
install and build:
> ./setup.py install
Installing on Linux
===================
Standard distutils installation steps should apply here. At the current time
the Linux port of psutil does not require any C modules, so can be installed
without need for a compiler using disutils:
install/build:
> ./setup.py install
|