5
The easiest way to install psutil from sources is using easy_install.
6
Get the latest easy_install version from http://pypi.python.org/pypi/setuptools
11
This should get the most updated psutil version from the Python pypi repository,
12
unpack it, compile it and install it automatically.
15
===================================
16
Installing on Windows using mingw32
17
===================================
19
After the mingw [1] environment is properly set up on your system you can
20
compile Windows sources by entering:
22
setup.py build -c mingw32
24
To compile and install just append the "install" keyword at the end of the
25
command line above, like this:
27
setup.py build -c mingw32 install
29
It might be possible that distutils will complain about missing gcc executable.
30
That means you have to add mingw bin PATH variable first.
31
Entering this line in the command prompt should do the work:
33
SET PATH=C:\MinGW\bin;%PATH%
35
NOTE: this assumes MinGW is installed in C:\MinGW, if not simply replace the
36
path in the command above with an appropriate location.
38
[1] http://www.mingw.org/
41
=========================================
42
Installing on Windows using Visual Studio
43
=========================================
45
To use Visual Studio to install psutil, you must have the same version of
46
Visual Studio used to compile your installation of Python. For older versions
47
of Python that will be Visual Studio 2003. For 2.6 and later it should be
48
Visual Studio 2008. If you do not have the requisite version of Visual Studio
49
available then it is recommended to use MinGW to compile psutil instead.
50
If you do have Visual Studio installed, you can use the basic distutils
55
...or to install and build:
59
distutils should take care of any necessary magic to compile from there.
66
OS X installation from source will require gcc which you can obtain as part of
67
the 'XcodeTools' installer from Apple. Then you can run the standard distutils
75
python setup.py install
77
NOTE: due to developer's hardware limitations psutil has only been compiled and
78
tested on OS X 10.4.11 so may or may not work on other versions.
85
The same compiler used to install Python must be present on the system in order
86
to build modules using distutils. Assuming it is installed, you can build using
87
the standard distutils commands.
95
python setup.py install
102
gcc is required and so the python headers. They can easily be installed by using
103
the distro package manager. For example, on Ubuntu:
105
sudo apt-get install python-dev
107
Once done, you can install/build psutil with:
109
python setup.py install